3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(0); ini_set('display_errors', '0'); register_shutdown_function(function (): void { // error handler consumes non-fatal errors $error = error_get_last(); if($error){ echo "System died.\n"; var_dump($error); } }); set_error_handler(function(...$error){ echo "Error handler.\n"; var_dump($error); }); $f .= ''; // test out of memory $d = str_repeat('f', 100000); foreach (range(1, 100) as $x) { $d = $d . $d; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 30
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/cE3Xn
function name:  (null)
number of ops:  32
compiled vars:  !0 = $f, !1 = $d, !2 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     0
          2        DO_ICALL                                                     
    4     3        INIT_FCALL                                                   'ini_set'
          4        SEND_VAL                                                     'display_errors'
          5        SEND_VAL                                                     '0'
          6        DO_ICALL                                                     
    6     7        INIT_FCALL                                                   'register_shutdown_function'
          8        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   13     9        SEND_VAL                                                     ~5
    6    10        DO_ICALL                                                     
   15    11        INIT_FCALL                                                   'set_error_handler'
         12        DECLARE_LAMBDA_FUNCTION                              ~7      [1]
   18    13        SEND_VAL                                                     ~7
   15    14        DO_ICALL                                                     
   20    15        ASSIGN_OP                                         8          !0, ''
   23    16        INIT_FCALL                                                   'str_repeat'
         17        SEND_VAL                                                     'f'
         18        SEND_VAL                                                     100000
         19        DO_ICALL                                             $10     
         20        ASSIGN                                                       !1, $10
   24    21        INIT_FCALL                                                   'range'
         22        SEND_VAL                                                     1
         23        SEND_VAL                                                     100
         24        DO_ICALL                                             $12     
         25      > FE_RESET_R                                           $13     $12, ->30
         26    > > FE_FETCH_R                                                   $13, !2, ->30
   25    27    >   CONCAT                                               ~14     !1, !1
         28        ASSIGN                                                       !1, ~14
   24    29      > JMP                                                          ->26
         30    >   FE_FREE                                                      $13
   26    31      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/cE3Xn
function name:  {closure:/in/cE3Xn:6}
number of ops:  9
compiled vars:  !0 = $error
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'error_get_last'
          1        DO_ICALL                                             $1      
          2        ASSIGN                                                       !0, $1
    9     3      > JMPZ                                                         !0, ->8
   10     4    >   ECHO                                                         'System+died.%0A'
   11     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                                     
   13     8    > > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cE3Xn
function name:  {closure:/in/cE3Xn:15}
number of ops:  6
compiled vars:  !0 = $error
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV_VARIADIC                                        !0      
   16     1        ECHO                                                         'Error+handler.%0A'
   17     2        INIT_FCALL                                                   'var_dump'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                                     
   18     5      > RETURN                                                       null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
121.31 ms | 549 KiB | 17 Q