summaryrefslogtreecommitdiff
path: root/tests/lang/each_binary_safety.phpt
blob: ce175495aacdf394776ad3357bb7f33eb176684a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--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";
}
?>
--EXPECTF--
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
7: foo%00bar => foo%00bar