offset_object.phpt 245 B

1234567891011121314
  1. --TEST--
  2. accessing object dimension
  3. --FILE--
  4. <?php
  5. $object = new stdClass;
  6. var_dump($object[1]);
  7. ?>
  8. --EXPECTF--
  9. Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
  10. Stack trace:
  11. #0 {main}
  12. thrown in %s on line %d