SplFileObject_key_error002.phpt 345 B

12345678910111213141516171819202122
  1. --TEST--
  2. SPL: SplFileObject::key error
  3. --CREDITS--
  4. Ricardo Oedietram <ricardo@odracir.nl>
  5. Erwin Poeze <erwin.poeze@gmail.com>
  6. #PFZ June PHP TestFest 2012
  7. --FILE--
  8. <?php
  9. //line 2
  10. //line 3
  11. //line 4
  12. //line 5
  13. $s = new SplFileObject(__FILE__);
  14. $s->seek(120);
  15. $s->next();
  16. var_dump($s->key());
  17. var_dump($s->valid());
  18. ?>
  19. --EXPECT--
  20. int(13)
  21. bool(false)