fork download
  1. <?php
  2.  
  3. $error = error_get_last();
  4. if ($error['type'] & (E_ERROR | E_USER_ERROR | E_CORE_ERROR | E_PARSE)) {
  5. var_dump($error['message']);
  6. test();
  7. }
  8. });
  9.  
  10. function test() {
  11. static $i = 0;
  12. var_dump(++$i . ': test() was called.');
  13. while ($a[] = true);
  14. }
  15.  
  16. test();
Runtime error #stdin #stdout #stderr 2.32s 20520KB
stdin
Standard input is empty
stdout
string(21) "1: test() was called."
string(64) "Out of memory (allocated 534249472) (tried to allocate 36 bytes)"
string(21) "2: test() was called."
stderr
PHP Fatal error:  Out of memory (allocated 534249472) (tried to allocate 36 bytes) in /home/DMgLCC/prog.php on line 14