mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +08:00
Add directories for tests relating to - `break` statements - functions with by-ref returns - `class_exists()` - dynamic properties - error handlers - error suppression with `@` - `get_object_vars()` - `highlight_string()` and `highlight_file()` - interfaces - `is_callable()` - iterators - shutdown functions - streams As well as organizing a couple of tests into existing sub directories along the way Work towards GH-15631
18 lines
460 B
PHP
18 lines
460 B
PHP
--TEST--
|
|
Bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)
|
|
--FILE--
|
|
<?php
|
|
set_error_handler(function ($severity, $message, $file, $line) {
|
|
throw new \Exception($message);
|
|
});
|
|
|
|
$x = "foo";
|
|
$y = &$x["2bar"];
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception: Illegal string offset "2bar" in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): {closure:%s:%d}(2, 'Illegal string ...', '%s', 7)
|
|
#1 {main}
|
|
thrown in %sbug76534.php on line %d
|