Bug #67503 [NEW]: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch

From: Date: Mon, 23 Jun 2014 13:57:31 +0000
Subject: Bug #67503 [NEW]: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186304@lists.php.net to get a copy of this message
From: snebes at digitalbrandworks dot com Operating system: Ubuntu 12.04 PHP version: 5.5.13 Package: SimpleXML related Bug Type: Bug Bug description:PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch Description: ------------ PHP: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch and PHP 5.5.9-1ubuntu4 (my test env). Appears to span multiple versions. Description: Using SimpleXML Nodes in mathematical equations doesn't correctly convert strings to floats, as expected, but only to integers (stopping at the decimal). Modules: aptitude managed, with cURL installed. Everything else is vanilla. FYI - the "PHP Version" can't be changed on the bug submitting form after an error occurs when submitting asking me to change it.... Test script: --------------- <?php // Does NOT work as expected. $sxml = simplexml_load_string('<test><num>20.5</num><den>1</den></test>'); $ans = $sxml->num / $sxml->den; echo "XML Test:\n"; echo "{$sxml->num} / {$sxml->den} = {$ans}\n"; // Output: 20.5 / 1 = 20 // Works as expected. $num = "20.5"; $den = "1"; $ans = $num / $den; echo "String Test:\n"; echo "{$num} / {$den} = {$ans}\n"; // Output: 20.5 / 1 = 20.5 -- Edit bug report at https://bugs.php.net/bug.php?id=67503&edit=1 --

« previous php.bugs (#186304) next »