]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Thu, 17 Jul 2003 21:02:45 +0000 (21:02 +0000)
committerSVN Migration <svn@php.net>
Thu, 17 Jul 2003 21:02:45 +0000 (21:02 +0000)
tests/lang/bug24640.phpt [new file with mode: 0755]

diff --git a/tests/lang/bug24640.phpt b/tests/lang/bug24640.phpt
new file mode 100755 (executable)
index 0000000..39561bd
--- /dev/null
@@ -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
+------