xref: /PHP-5.6/tests/lang/bug29566.phpt (revision 610c7fbe)
1--TEST--
2Bug #29566 (foreach/string handling strangeness)
3--FILE--
4<?php
5$var="This is a string";
6
7$dummy="";
8unset($dummy);
9
10foreach($var['nosuchkey'] as $v) {
11}
12?>
13===DONE===
14--EXPECTF--
15Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d
16
17Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d
18===DONE===
19