indirect_method_call_005.phpt 289 B

12345678910111213141516
  1. --TEST--
  2. Testing array dereferencing from instance with ArrayObject
  3. --FILE--
  4. <?php
  5. class foo extends ArrayObject {
  6. public function __construct($arr) {
  7. parent::__construct($arr);
  8. }
  9. }
  10. var_dump( (new foo( array(1, array(4, 5), 3) ))[1][0] ); // int(4)
  11. ?>
  12. --EXPECT--
  13. int(4)