each_002.phpt 490 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Testing each() with array and object
  3. --FILE--
  4. <?php
  5. $a = new stdClass;
  6. $foo = each($a);
  7. var_dump($foo);
  8. $a = new stdClass;
  9. var_dump(each($a));
  10. $a = array(new stdClass);
  11. var_dump(each($a));
  12. ?>
  13. --EXPECTF--
  14. Deprecated: The each() function is deprecated. This message will be suppressed on further calls in %s on line %d
  15. bool(false)
  16. bool(false)
  17. array(4) {
  18. [1]=>
  19. object(stdClass)#1 (0) {
  20. }
  21. ["value"]=>
  22. object(stdClass)#1 (0) {
  23. }
  24. [0]=>
  25. int(0)
  26. ["key"]=>
  27. int(0)
  28. }