each_002.phpt 359 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Testing each() with array and object
  3. --FILE--
  4. <?php
  5. $foo = each(new stdClass);
  6. var_dump($foo);
  7. var_dump(each(new stdClass));
  8. $a = array(new stdClass);
  9. var_dump(each($a));
  10. ?>
  11. --EXPECTF--
  12. bool(false)
  13. bool(false)
  14. array(4) {
  15. [1]=>
  16. object(stdClass)#1 (0) {
  17. }
  18. ["value"]=>
  19. object(stdClass)#1 (0) {
  20. }
  21. [0]=>
  22. int(0)
  23. ["key"]=>
  24. int(0)
  25. }