3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function baz() { echo 'works'; } } eval( '$a = "Foo"; $a::baz();'); eval( '$a = new Foo(); $a::baz();'); eval( 'Foo::baz();');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOK44
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INCLUDE_OR_EVAL                                          '%24a+%3D+%22Foo%22%3B%0A%24a%3A%3Abaz%28%29%3B', EVAL
   15     1        INCLUDE_OR_EVAL                                          '%24a+%3D+new+Foo%28%29%3B%0A%24a%3A%3Abaz%28%29%3B', EVAL
   19     2        INCLUDE_OR_EVAL                                          'Foo%3A%3Abaz%28%29%3B', EVAL
          3      > RETURN                                                   1

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

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.67 ms | 1006 KiB | 13 Q