php-src/Zend/tests/offset_object.phpt
2018-10-14 19:45:12 +02: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