mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
19 lines
332 B
PHP
19 lines
332 B
PHP
--TEST--
|
|
string offset 008 indirect string modification by error handler
|
|
--FILE--
|
|
<?php
|
|
set_error_handler(function($code, $msg) {
|
|
echo "Err: $msg\n";
|
|
$GLOBALS['a']=8;
|
|
});
|
|
$z = "z";
|
|
$a=["xx$z"];
|
|
var_dump($a[0][$b]);
|
|
var_dump($a);
|
|
?>
|
|
--EXPECT--
|
|
Err: Undefined variable $b
|
|
Err: String offset cast occurred
|
|
string(1) "x"
|
|
int(8)
|