WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : This functions compares the current PHP version with a desired version. Because of the 3 tiered version system, a direct compare of a string to phpversion() will not be accurate.
Categories : PHP Configuration, PHP, Variables Update Picture
Brian Moon
Date : Apr 16th 1999
Grade : 2 of 5 (graded 2 times)
Viewed : 8414
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Brian Moon
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?PHP
function phpvercmp($minver){

$minver=explode(".", $minver);
$cnt=count($minver);
// find max digits in one portion
for($x=0;$x<3;$x++){
$len=strlen($minver[$x]);
if($pad<$len) $pad=$len;
}
$phpver=explode(".", phpversion());
// find max digits in one portion
for($x=0;$x<3;$x++){
$len=strlen($phpver[$x]);
if($pad<$len) $pad=$len;
}

$minver=sprintf("%0".$pad."d%0".$pad."d%0".$pad."d", $minver[0], $minver[1], $minver[2]);
$phpver=sprintf("%0".$pad."d%0".$pad."d%0".$pad."d", $phpver[0], $phpver[1], $phpver[2]);

echo "$minver<br>$phpver<p>";
if($phpver>=$minver){
return true;
}
else{
return false;
}
}
?>



How can i see the path of the php3.ini file my php3 uses?
Categories : PHP, PHP Configuration
How to know which input button of type image was pressed in a form with multiple image buttons (_x and _y) in PHP?
Categories : PHP, Variables, HTML
How to control the number of decimal places when outputting numbers.
Categories : PHP, Strings, Variables
Global Dump Highlighted
Categories : PHP, Variables, Global Variables
Simple script to passing persistent and growing array between recalls of one page (manipulate little stack).
Categories : Arrays, Global Variables, PHP, HTML and PHP, Variables
How to overide the Max_file_size barier
Categories : PHP, PHP Configuration, Filesystem
serialize -- Generates a storable representation of a value
Categories : PHP, PHP Functions, Variables
Step by Step installation manual for PHP4.1.x on Windows 2000 based systems running IIS5 using CGI or ISAPI
Categories : PHP, PHP Configuration, PHP Options and Info, Windows 2000
getting the name of the current script and query string
Categories : PHP, Global Variables, Variables, URLs
Variable serialization and unserialization. Loading and saving variable structures to and from file.
Categories : Arrays, Filesystem, Variables, Strings, PHP
Newbie Notes #5 - To double quote, or single quote, that is the question
Categories : PHP, Beginner Guides, Variables
Pageinfo: Array containing page URI, page query string (parameters), request method (GET or POST) and the complete URI
Categories : Variables, PHP Options and Info, Arrays, URLs, PHP
Define equivalents in php3.
Categories : PHP, Variables
What to do if PHP3 doesn't find your FreeType library.
Categories : PHP Configuration, Installation, PHP
Sessions and -enable-trans-sid
Categories : PHP, PHP Configuration, PHP Options and Info, Sessions