3v4l.org

run code in 300+ PHP versions simultaneously
<?php function throw_error() { throw new ErrorException("What's this look like?", 0, E_USER_NOTICE, __FILE__, __LINE__); } function main() { try { throw_error(); } catch (ErrorException $e) { echo "$e\n"; } } main();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qmjqk
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'main'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function throw_error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/qmjqk
function name:  throw_error
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'ErrorException'
          1        SEND_VAL_EX                                              'What%27s+this+look+like%3F'
          2        SEND_VAL_EX                                              0
          3        SEND_VAL_EX                                              1024
          4        SEND_VAL_EX                                              '%2Fin%2Fqmjqk'
          5        SEND_VAL_EX                                              4
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $0
    5     8*     > RETURN                                                   null

End of function throw_error

Function main:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qmjqk
function name:  main
number of ops:  8
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'throw_error'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->7
   11     3  E > > CATCH                                       last         'ErrorException'
   12     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~2      !0, '%0A'
          6        ECHO                                                     ~2
   14     7    > > RETURN                                                   null

End of function main

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.45 ms | 1399 KiB | 15 Q