Files
Daniel Scherzer 886ee6d981 Zend/tests: organize some tests with sub directories (11) (#22731)
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
2026-09-30 15:52:59 +01:00

32 lines
650 B
PHP

--TEST--
Bug #80781: Error handler that throws ErrorException infinite loop
--FILE--
<?php
function handle(int $severity, string $message, string $file, int $line): bool {
if((error_reporting() & $severity) !== 0) {
throw new \ErrorException($message, 0, $severity, $file, $line);
}
return true; // stfu operator
}
set_error_handler('handle');
function getPlugin(string $plugin) : bool{
return false;
}
$data = [];
$array = [];
if (isset($array[$data]) or getPlugin($data)) {
}
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Cannot access offset of type array in isset or empty in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d