033.phpt 575 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Using undefined multidimensional array
  3. --FILE--
  4. <?php
  5. $arr[1][2][3][4][5];
  6. echo $arr[1][2][3][4][5];
  7. $arr[1][2][3][4][5]->foo;
  8. $arr[1][2][3][4][5]->foo = 1;
  9. $arr[][] = 2;
  10. $arr[][]->bar = 2;
  11. ?>
  12. --EXPECTF--
  13. Notice: Undefined variable: arr in %s on line %d
  14. Notice: Undefined variable: arr in %s on line %d
  15. Notice: Undefined variable: arr in %s on line %d
  16. Notice: Trying to get property 'foo' of non-object in %s on line %d
  17. Warning: Creating default object from empty value in %s on line %d
  18. Warning: Creating default object from empty value in %s on line %d