inference_002.phpt 347 B

123456789101112131415
  1. --TEST--
  2. Type inference 002: Type inference for INIT_ARRAY with invalid index
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. --FILE--
  8. <?php
  9. var_dump([[]=>&$x]);
  10. ?>
  11. --EXPECTF--
  12. Fatal error: Uncaught TypeError: Illegal offset type in %sinference_002.php:2
  13. Stack trace:
  14. #0 {main}
  15. thrown in %sinference_002.php on line 2