3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_errors', false); error_reporting(-1); set_error_handler(function($code, $string, $file, $line){ throw new ErrorException($string, null, $code, $file, $line); }); register_shutdown_function(function(){ $error = error_get_last(); if(null !== $error) { echo 'Caught at shutdown'; } }); try { while(true) { $data .= str_repeat('#', PHP_INT_MAX); } } catch(\Exception $exception) { echo 'Caught in try/catch'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
Branch analysis from position: 16
Found catch point at position: 23
Branch analysis from position: 23
2 jumps found. (Code = 107) Position 1 = 24, Position 2 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n7OSa
function name:  (null)
number of ops:  26
compiled vars:  !0 = $data, !1 = $exception
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'display_errors'
          2        SEND_VAL                                                 <false>
          3        DO_ICALL                                                 
    5     4        INIT_FCALL                                               'error_reporting'
          5        SEND_VAL                                                 -1
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'set_error_handler'
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fn7OSa%3A7%240'
    9     9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   11    11        INIT_FCALL                                               'register_shutdown_function'
         12        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fn7OSa%3A11%241'
   17    13        SEND_VAL                                                 ~6
         14        DO_ICALL                                                 
   21    15      > JMP                                                      ->21
   23    16    >   INIT_FCALL                                               'str_repeat'
         17        SEND_VAL                                                 '%23'
         18        SEND_VAL                                                 9223372036854775807
         19        DO_ICALL                                         $8      
         20        ASSIGN_OP                                     8          !0, $8
   21    21    > > JMPNZ                                                    <true>, ->16
         22    > > JMP                                                      ->25
   26    23  E > > CATCH                                       last         'Exception'
   28    24    >   ECHO                                                     'Caught+in+try%2Fcatch'
   29    25    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fn7OSa%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/n7OSa
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $code, !1 = $string, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    8     4        NEW                                              $4      'ErrorException'
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              null
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $4
    9    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fn7OSa%3A7%240

Function %00%7Bclosure%7D%2Fin%2Fn7OSa%3A11%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/n7OSa
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'error_get_last'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   13     3        TYPE_CHECK                                  1020          !0
          4      > JMPZ                                                     ~3, ->6
   15     5    >   ECHO                                                     'Caught+at+shutdown'
   17     6    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fn7OSa%3A11%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.53 ms | 1400 KiB | 25 Q