3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar() { echo "Hello World\n"; } static function x() { echo "Hello static world\n"; } } array(new Foo, "bar")(); array("Foo", "x")(); var_dump("strlen"("foo"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C7OBv
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~2      $0
          3        ADD_ARRAY_ELEMENT                                ~2      'bar'
          4        INIT_DYNAMIC_CALL                                        ~2
          5        DO_FCALL                                      0          
   17     6        INIT_DYNAMIC_CALL                                        <array>
          7        DO_FCALL                                      0          
   19     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAL                                                 3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function bar

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C7OBv
function name:  x
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'Hello+static+world%0A'
   13     1      > RETURN                                                   null

End of function x

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.07 ms | 1395 KiB | 15 Q