]> granicus.if.org Git - php/commitdiff
test for bug #14580 (key() not binary safe)
authorfoobar <sniper@php.net>
Thu, 24 Jul 2003 10:13:17 +0000 (10:13 +0000)
committerfoobar <sniper@php.net>
Thu, 24 Jul 2003 10:13:17 +0000 (10:13 +0000)
ext/standard/tests/array/bug14580.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/array/bug14580.phpt b/ext/standard/tests/array/bug14580.phpt
new file mode 100644 (file)
index 0000000..ddf467a
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--n
+Bug #14580 (key() not binary safe)
+--FILE--
+<?php
+       $arr = array ("foo\0bar" => "foo\0bar");
+       print_r($arr);
+       $key = key($arr);
+       echo strlen($key), ': ', $key, "\n";
+?>
+--EXPECT--
+Array
+(
+    [foobar] => foobar
+)
+7: foobar