From: [EMAIL PROTECTED]
Operating system: windows ME
PHP version: 4.1.0
PHP Bug Type: Feature/Change Request
Bug description: phpversion (bool Float) request
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.
--
Edit bug report at: http://bugs.php.net/?id=14704&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]