falsetoarray_003.phpt 331 B

12345678910111213141516
  1. --TEST--
  2. Autovivification of false to array with data clobbering by error handler
  3. --FILE--
  4. <?php
  5. set_error_handler(function($code, $msg) {
  6. echo "Err: $msg\n";
  7. $GLOBALS['a']=9;
  8. });
  9. $a=[];
  10. ($a[PHP_INT_MAX+1]);
  11. ?>
  12. DONE
  13. --EXPECTF--
  14. Err: Implicit conversion from float %f to int loses precision
  15. Err: Undefined array key %i
  16. DONE