3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_exception_handler(function() { echo 3; }); function test() { echo 1; throw new \Exception("test"); echo 2; } test(); echo 4;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Iv6OZ
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIv6OZ%3A2%240'
    4     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   12     4        INIT_FCALL                                               'test'
          5        DO_FCALL                                      0          
   13     6        ECHO                                                     4
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FIv6OZ%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Iv6OZ
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     3
    4     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FIv6OZ%3A2%240

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/Iv6OZ
function name:  test
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     1
    8     1        NEW                                              $0      'Exception'
          2        SEND_VAL_EX                                              'test'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $0
    9     5*       ECHO                                                     2
   10     6*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.71 ms | 1389 KiB | 16 Q