summaryrefslogtreecommitdiff
path: root/tests/lang/bug29566.phpt
blob: 16aec8fc73420779d6b0cfbee48d9ee6299c0630 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #29566 (foreach/string handling strangeness)
--FILE--
<?php
$var="This is a string";

$dummy="";
unset($dummy);

foreach($var['nosuchkey'] as $v) {
}
?>
===DONE===
--EXPECTF--
Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d

Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d
===DONE===