3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { eval("function bar() {throw new exception();} bar();"); } try { foo(); } catch (exception $e) { var_dump($e->getTraceAsString()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
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/TNVeT
function name:  (null)
number of ops:  10
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
          2      > JMP                                                      ->9
   13     3  E > > CATCH                                       last         'exception'
   14     4    >   INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getTraceAsString'
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
   15     9    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TNVeT
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INCLUDE_OR_EVAL                                          'function+bar%28%29+%7Bthrow+new+exception%28%29%3B%7D+bar%28%29%3B', EVAL
    7     1      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.88 ms | 1401 KiB | 16 Q