iap_on_object_deprecated.phpt 812 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Using IAP functions on objects is deprecated
  3. --FILE--
  4. <?php
  5. $obj = (object)['a' => 'b'];
  6. var_dump(reset($obj));
  7. var_dump(current($obj));
  8. var_dump(key($obj));
  9. var_dump(next($obj));
  10. var_dump(end($obj));
  11. var_dump(prev($obj));
  12. ?>
  13. --EXPECTF--
  14. Deprecated: reset(): Calling reset() on an object is deprecated in %s on line %d
  15. string(1) "b"
  16. Deprecated: current(): Calling current() on an object is deprecated in %s on line %d
  17. string(1) "b"
  18. Deprecated: key(): Calling key() on an object is deprecated in %s on line %d
  19. string(1) "a"
  20. Deprecated: next(): Calling next() on an object is deprecated in %s on line %d
  21. bool(false)
  22. Deprecated: end(): Calling end() on an object is deprecated in %s on line %d
  23. string(1) "b"
  24. Deprecated: prev(): Calling prev() on an object is deprecated in %s on line %d
  25. bool(false)