]> granicus.if.org Git - php/commitdiff
MFZE2: made each() binary safe for keys
authorfoobar <sniper@php.net>
Tue, 29 Jul 2003 11:19:47 +0000 (11:19 +0000)
committerfoobar <sniper@php.net>
Tue, 29 Jul 2003 11:19:47 +0000 (11:19 +0000)
tests/lang/each_binary_safety.phpt

index bb135345464ca5d7ea6d97d00a69035a4a022cee..f6def82ecbd0243f79d4f348a6f85b794861579d 100644 (file)
@@ -5,8 +5,8 @@ Binary safety of each() for both keys and values
 error_reporting(E_ALL);
 $arr = array ("foo\0bar" => "foo\0bar");
 while (list($key, $val) = each($arr)) {
-       echo strlen($key), ': ';
-       echo urlencode($key), ' => ', urlencode($val), "\n";
+        echo strlen($key), ': ';
+        echo urlencode($key), ' => ', urlencode($val), "\n";
 }
 ?>
 --EXPECT--