mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
1a3bdb4a2c
run-tests.php enforces error_reporting=E_ALL (including E_STRICT), setting this explicitly in not necessary. Conversely, after the removal of some E_STRICT errors, explicitly excluding it is no longer necessary in some places.
35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
--TEST--
|
|
Bug #74408 (Endless loop bypassing execution time limit)
|
|
--FILE--
|
|
<?php
|
|
|
|
class ErrorHandling {
|
|
|
|
public function error_handler($errno, $errstr, $errfile, $errline) {
|
|
$bla = new NonExistingClass2();
|
|
}
|
|
|
|
public function exception_handler(Error $e) {
|
|
echo "Caught, exception: " . $e->getMessage();
|
|
}
|
|
}
|
|
|
|
set_error_handler('ErrorHandling::error_handler');
|
|
set_exception_handler('ErrorHandling::exception_handler');
|
|
|
|
$blubb = new NonExistingClass();
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
|
|
|
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
|
|
|
|
Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in Unknown on line 0
|
|
|
|
Fatal error: Uncaught Error: Class 'NonExistingClass2' not found in %sbug74408.php:%d
|
|
Stack trace:
|
|
#0 [internal function]: ErrorHandling::error_handler(8192, 'Non-static meth...', '%s', %d, Array)
|
|
#1 %sbug74408.php(%d): set_exception_handler('ErrorHandling::...')
|
|
#2 {main}
|
|
thrown in %sbug74408.php on line %d
|