array_026.phpt 566 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. SPL: ArrayObject indirect offsetGet overwriting EG(uninitialized_zvar_ptr)
  3. --FILE--
  4. <?php
  5. $test = new ArrayObject();
  6. $test['d1']['d2'] = 'hello';
  7. $test['d1']['d3'] = 'world';
  8. var_dump($test, $test3['mmmmm']);
  9. ?>
  10. --EXPECTF--
  11. Warning: Undefined variable $test3 in %s on line %d
  12. Warning: Trying to access array offset on value of type null in %s on line %d
  13. object(ArrayObject)#1 (1) {
  14. ["storage":"ArrayObject":private]=>
  15. array(1) {
  16. ["d1"]=>
  17. array(2) {
  18. ["d2"]=>
  19. string(5) "hello"
  20. ["d3"]=>
  21. string(5) "world"
  22. }
  23. }
  24. }
  25. NULL