php-src/ext/standard/tests/array/bug14580.phpt

12 lines
203 B
Plaintext
Raw Normal View History

--TEST--n
Bug #14580 (key() not binary safe)
--FILE--
<?php
$arr = array ("foo\0bar" => "foo\0bar");
$key = key($arr);
2003-07-24 10:37:57 +00:00
echo strlen($key), ': ';
echo urlencode($key), "\n";
?>
--EXPECT--
2003-07-24 10:37:57 +00:00
7: foo%00bar