Bug #14704: phpversion (bool Float) request

From: Date: Wed, 26 Dec 2001 20:20:06 +0000
Subject: Bug #14704: phpversion (bool Float) request
Groups: php.dev 
Request: Send a blank email to php-dev+get-75058@lists.php.net to get a copy of this message
From: roberto@berto.net 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

« previous php.dev (#75058) next »