]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Mon, 16 Feb 2004 16:50:54 +0000 (16:50 +0000)
committerSVN Migration <svn@php.net>
Mon, 16 Feb 2004 16:50:54 +0000 (16:50 +0000)
ext/standard/tests/strings/bug27278.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/strings/bug27278.phpt b/ext/standard/tests/strings/bug27278.phpt
new file mode 100644 (file)
index 0000000..e124471
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Bug #27278 (sprintf(): global variable changing type when passed to function by value)
+--FILE--
+<?php
+
+function foo ($a)
+{
+       $a=sprintf("%02d",$a);
+       var_dump($a);
+}
+
+$x="02";
+var_dump($x);
+foo($x);
+var_dump($x);
+
+?>
+--EXPECT--
+string(2) "02"
+string(2) "02"
+string(2) "02"