diff options
author | Marcus Boerger <helly@php.net> | 2003-07-17 21:02:44 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-07-17 21:02:44 +0000 |
commit | 4e2b88255c29ec1fd83583ba190827b9ab28662d (patch) | |
tree | 97ec07f0b1ee85c3c74124328cd6829e0a180d03 /tests | |
parent | 02c55f6c63acf31beff6d0c4b6a6aa8bf7a1ca84 (diff) | |
download | php-git-4e2b88255c29ec1fd83583ba190827b9ab28662d.tar.gz |
Add test for bug #24640
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/lang/bug24640.phpt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt new file mode 100755 index 0000000000..39561bd47e --- /dev/null +++ b/tests/lang/bug24640.phpt @@ -0,0 +1,63 @@ +--TEST-- +Bug #24640 var_export and var_dump can't output large float +--FILE-- +<?php +function test($v) +{ + echo var_export($v, true) . "\n"; + var_dump($v); + echo "$v\n"; + print_r($v); + echo "\n------\n"; +} + +test(1.7e+300); +test(1.7e-300); +test(1.7e+79); +test(1.7e-79); +test(1.7e+80); +test(1.7e-80); +test(1.7e+81); +test(1.7e-81); +?> +--EXPECT-- +1.7E+300 +float(1.7E+300) +1.7E+300 +1.7E+300 +------ +1.7E-300 +float(1.7E-300) +1.7E-300 +1.7E-300 +------ +1.7E+79 +float(1.7E+79) +1.7E+79 +1.7E+79 +------ +1.7E-79 +float(1.7E-79) +1.7E-79 +1.7E-79 +------ +1.7E+80 +float(1.7E+80) +1.7E+80 +1.7E+80 +------ +1.7E-80 +float(1.7E-80) +1.7E-80 +1.7E-80 +------ +1.7E+81 +float(1.7E+81) +1.7E+81 +1.7E+81 +------ +1.7E-81 +float(1.7E-81) +1.7E-81 +1.7E-81 +------ |