Browse Source
Fix bug #66179
Fix bug #66179
This also fixes ext/standard/tests/general_functions/var_export-locale.phpt to actually run the floating-point section.pull/1713/head
7 changed files with 200 additions and 79 deletions
-
1NEWS
-
138ext/standard/tests/general_functions/var_export-locale.phpt
-
4ext/standard/tests/general_functions/var_export_basic1.phpt
-
96ext/standard/tests/general_functions/var_export_basic3.phpt
-
29ext/standard/tests/general_functions/var_export_bug66179.phpt
-
7ext/standard/var.c
-
4tests/lang/bug24640.phpt
@ -0,0 +1,29 @@ |
|||
--TEST-- |
|||
Bug #66179 (var_export() exports float as integer) |
|||
--FILE-- |
|||
<?php |
|||
|
|||
var_export(1.0); |
|||
echo PHP_EOL; |
|||
var_export(123.0); |
|||
echo PHP_EOL; |
|||
var_export(-1.0); |
|||
echo PHP_EOL; |
|||
var_export(-123.0); |
|||
echo PHP_EOL; |
|||
var_export(0.0); |
|||
echo PHP_EOL; |
|||
var_export(-0.0); |
|||
echo PHP_EOL; |
|||
var_export(10000000000000000.0); |
|||
echo PHP_EOL; |
|||
|
|||
?> |
|||
--EXPECTF-- |
|||
1.0 |
|||
123.0 |
|||
-1.0 |
|||
-123.0 |
|||
0.0 |
|||
-0.0 |
|||
10000000000000000.0 |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue