3v4l.org

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

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/62BeK
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

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
130.16 ms | 1444 KiB | 14 Q