xref: /php-src/tests/lang/bug29566.phpt (revision b2248789)
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['0nosuchkey'] as $v) {
11}
12?>
13--EXPECTF--
14Warning: Illegal string offset "0nosuchkey" in %s on line %d
15
16Warning: foreach() argument must be of type array|object, string given in %sbug29566.php on line %d
17