php-src/tests/lang/bug29566.phpt

19 lines
351 B
Plaintext
Raw Normal View History

2004-08-24 21:35:46 +00:00
--TEST--
Bug #29566 (foreach/string handling strangeness)
--FILE--
2004-08-25 07:25:54 +00:00
<?php
2004-08-24 21:35:46 +00:00
$var="This is a string";
$dummy="";
unset($dummy);
foreach($var['nosuchkey'] as $v) {
}
?>
===DONE===
--EXPECTF--
2011-12-19 16:57:36 +00:00
Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d
2004-08-24 21:35:46 +00:00
Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d
===DONE===