mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
24 lines
456 B
PHP
24 lines
456 B
PHP
--TEST--
|
|
Bug #54973: SimpleXML casts integers wrong
|
|
--EXTENSIONS--
|
|
simplexml
|
|
--FILE--
|
|
<?php
|
|
$xml = simplexml_load_string("<xml><number>9223372036854775808</number></xml>");
|
|
|
|
var_dump($xml->number);
|
|
|
|
$int = $xml->number / 1024 / 1024 / 1024;
|
|
var_dump($int);
|
|
|
|
$float = (float) $xml->number / 1024 / 1024 / 1024;
|
|
var_dump($float);
|
|
?>
|
|
--EXPECT--
|
|
object(SimpleXMLElement)#2 (1) {
|
|
[0]=>
|
|
string(19) "9223372036854775808"
|
|
}
|
|
float(8589934592)
|
|
float(8589934592)
|