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

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

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

Warning: foreach() argument must be of type array|object, string given in %sbug29566.php on line %d