xref: /PHP-8.0/Zend/tests/str_offset_007.phpt (revision 09547c64)
1--TEST--
2string offset 007 indirect string modification by error handler
3--FILE--
4<?php
5set_error_handler(function($code, $msg) {
6    echo "Err: $msg\n";
7    $GLOBALS['a']='';
8});
9$a=['a'];
10$a[0][$d]='b';
11var_dump($a);
12?>
13--EXPECT--
14Err: Undefined variable $d
15Err: String offset cast occurred
16string(0) ""
17