falsetoarray_002.phpt 314 B

123456789101112131415
  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']='';
  8. });
  9. $a=[!'a'];
  10. $a[0][$d]='b';
  11. var_dump($a);
  12. ?>
  13. --EXPECT--
  14. Err: Automatic conversion of false to array is deprecated
  15. string(0) ""