php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54458
Patch numeric-test.txt revision 2011-04-03 15:36 UTC by cs dot luizeduardo at hotmail dot com

Patch numeric-test.txt for Variables related Bug #54458

Patch version 2011-04-03 15:36 UTC

Return to Bug #54458 | Download this patch
Patch Revisions:

Developer: cs.luizeduardo@hotmail.com

$numero = "1.1";
if (intval($numero * 100) == $numero * 100) 
{
        echo intval($numero * 100) . ":" . $numero * 100 . "<br/>"; 
	echo "Number OK!";
    } else {
	echo intval($numero * 100) . ":" . $numero * 100 . "<br/>"; //Return 110:110 (same) but the comparison has fail
	echo "The number shoud contains 2 decimal places";
}
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 21:01:38 2025 UTC