xref: /php-src/tests/lang/bug24783.phpt (revision f8d79582)
1--TEST--
2Bug #24783 ($key not binary safe in "foreach($arr as $key => $val)")
3--FILE--
4<?php
5error_reporting(E_ALL);
6    $arr = array ("foo\0bar" => "foo\0bar");
7    foreach ($arr as $key => $val) {
8        echo strlen($key), ': ';
9        echo urlencode($key), ' => ', urlencode($val), "\n";
10    }
11?>
12--EXPECT--
137: foo%00bar => foo%00bar
14