summaryrefslogtreecommitdiff
path: root/tests/lang/each_binary_safety.phpt
blob: bb135345464ca5d7ea6d97d00a69035a4a022cee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
Binary safety of each() for both keys and values
--FILE--
<?php
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";
}
?>
--EXPECT--
7: foo%00bar => foo%00bar