3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo{ function bar(); } try{ eval("class Bar implements Foo{}"); }catch(Throwable $e){ var_dump($e); // Y U NO recoverable? }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 2
Branch analysis from position: 2
2 jumps found. (Code = 107) Position 1 = 3, Position 2 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D91EL
function name:  (null)
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INCLUDE_OR_EVAL                                          'class+Bar+implements+Foo%7B%7D', EVAL
          1      > JMP                                                      ->6
    6     2  E > > CATCH                                       last         'Throwable'
    7     3    >   INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    8     6    > > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D91EL
function name:  bar
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.51 ms | 1398 KiB | 15 Q