Bug #67503 [Opn->Csd]: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch
| From: | cmb@php.net | Date: | Tue, 07 Aug 2018 16:20:05 +0000 |
| Subject: | Bug #67503 [Opn->Csd]: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216665@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67503&edit=1
ID: 67503
Updated by: cmb@php.net
Reported by: snebes at digitalbrandworks dot com
Summary: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch
-Status: Open
+Status: Closed
Type: Bug
Package: SimpleXML related
Operating System: Ubuntu 12.04
PHP Version: 5.5.13
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Fixed via commit b2b2b43[1] for PHP 7.3[2]. Will not be backported
for BC reasons.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=b2b2b43>
[2] <https://3v4l.org/QmrVH>
Previous Comments:
------------------------------------------------------------------------
[2014-06-23 13:57:31] snebes at digitalbrandworks dot com
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 this bug report at https://bugs.php.net/bug.php?id=67503&edit=1