xref: /php-src/Zend/tests/bug81705.phpt (revision 727e26f9)
1--TEST--
2Bug #81705 (type confusion/UAF on set_error_handler with concat operation)
3--FILE--
4<?php
5
6$arr = [0];
7$my_var = str_repeat("a", 1);
8set_error_handler(
9    function() use(&$my_var) {
10        echo("error\n");
11        $my_var = 0x123;
12    }
13);
14$my_var .= $GLOBALS["arr"];
15var_dump($my_var);
16?>
17--EXPECT--
18error
19string(6) "aArray"