xref: /PHP-7.4/Zend/tests/bug74408.phpt (revision 782352c5)
1--TEST--
2Bug #74408 (Endless loop bypassing execution time limit)
3--FILE--
4<?php
5
6 class ErrorHandling {
7
8  public  function error_handler($errno, $errstr, $errfile, $errline) {
9	  $bla = new NonExistingClass2();
10  }
11
12  public function exception_handler(Error $e) {
13	  echo "Caught, exception: " . $e->getMessage();
14  }
15 }
16
17 set_error_handler('ErrorHandling::error_handler');
18 set_exception_handler('ErrorHandling::exception_handler');
19
20 $blubb = new NonExistingClass();
21?>
22--EXPECTF--
23Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
24
25Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in %sbug74408.php on line %d
26
27Deprecated: Non-static method ErrorHandling::error_handler() should not be called statically in Unknown on line 0
28
29Fatal error: Uncaught Error: Class 'NonExistingClass2' not found in %sbug74408.php:%d
30Stack trace:
31#0 [internal function]: ErrorHandling::error_handler(8192, 'Non-static meth...', '%s', %d, Array)
32#1 %sbug74408.php(%d): set_exception_handler('ErrorHandling::...')
33#2 {main}
34  thrown in %sbug74408.php on line %d
35