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