mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
a939805641
var_dump() is debugging functionality, so it should print floating-point numbers accurately. We do this by switching to serialize_precision, which (by default) will print with as much precision as necessary to preserve the exact value of the float. This also affects debug_zval_dump(). Closes GH-5172.
23 lines
252 B
PHP
23 lines
252 B
PHP
--TEST--
|
|
adding integers to doubles
|
|
--INI--
|
|
precision=14
|
|
--FILE--
|
|
<?php
|
|
|
|
$i = 75636;
|
|
$d = 2834681123.123123;
|
|
|
|
$c = $i + $d;
|
|
var_dump($c);
|
|
|
|
$c = $d + $i;
|
|
var_dump($c);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECT--
|
|
float(2834756759.123123)
|
|
float(2834756759.123123)
|
|
Done
|