From 4f3e52ac1b0b06a59d576ba480a8224500b2351b Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Thu, 24 Jul 2003 13:08:35 +0000 Subject: [PATCH] Add test for binary safety of each() --- tests/lang/each_binary_safety.phpt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/lang/each_binary_safety.phpt diff --git a/tests/lang/each_binary_safety.phpt b/tests/lang/each_binary_safety.phpt new file mode 100644 index 0000000000..bb13534546 --- /dev/null +++ b/tests/lang/each_binary_safety.phpt @@ -0,0 +1,13 @@ +--TEST-- +Binary safety of each() for both keys and values +--FILE-- + "foo\0bar"); +while (list($key, $val) = each($arr)) { + echo strlen($key), ': '; + echo urlencode($key), ' => ', urlencode($val), "\n"; +} +?> +--EXPECT-- +7: foo%00bar => foo%00bar -- 2.50.1