php-src/ext/standard/tests/array/bug14580.phpt
2020-02-03 22:52:20 +01:00

12 lines
214 B
PHP

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