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