|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-28 20:00 UTC] jimw@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
Look: <?PHP // return 4.1 print (float)PHP_VERSION; $v = 4.1.4; // return 4.1 print (float)$v; ?> If someone wants to compare the versions of PHP, so he need to create a preg-like routine to change the string of PHP version to double numbers. So, you can rewrite in C the phpversion to function phpversion($withFloat = FALSE) { if ($withFloat == TRUE) { return 4.14; } return "4.1.4"; } So, if someone want a float number, he will call phpversion(1); <?PHP // output 4.14 print phpversion(1); // output 4.1.4 print phpversion(); ?> Thanx.