php-src/Zend/tests/offset_object.phpt
2018-10-14 12:07:20 -03:00

15 lines
245 B
PHP

--TEST--
accessing object dimension
--FILE--
<?php
$object = new stdClass;
var_dump($object[1]);
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d