bug29566.phpt 351 B

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