From: foobar Date: Thu, 24 Jul 2003 10:42:17 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.3RC2~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fba6b0da53ca10d7f4163a97f583da6e1d003579;p=php MFH --- diff --git a/ext/standard/tests/array/bug14580.phpt b/ext/standard/tests/array/bug14580.phpt index ddf467a53b..8a80bddcb4 100644 --- a/ext/standard/tests/array/bug14580.phpt +++ b/ext/standard/tests/array/bug14580.phpt @@ -3,13 +3,9 @@ Bug #14580 (key() not binary safe) --FILE-- "foo\0bar"); - print_r($arr); $key = key($arr); - echo strlen($key), ': ', $key, "\n"; + echo strlen($key), ': '; + echo urlencode($key), "\n"; ?> --EXPECT-- -Array -( - [foobar] => foobar -) -7: foobar +7: foo%00bar diff --git a/tests/lang/bug24783.phpt b/tests/lang/bug24783.phpt index 4b5fa4f229..8c8cd6ee01 100644 --- a/tests/lang/bug24783.phpt +++ b/tests/lang/bug24783.phpt @@ -5,8 +5,9 @@ Bug #24783 ($key not binary safe in "foreach($arr as $key => $val)") error_reporting(E_ALL); $arr = array ("foo\0bar" => "foo\0bar"); foreach ($arr as $key => $val) { - echo strlen($key), ": $key => $val\n"; + echo strlen($key), ': '; + echo urlencode($key), ' => ', urlencode($val), "\n"; } ?> --EXPECT-- -7: foobar => foobar +7: foo%00bar => foo%00bar