3v4l.org

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

Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fMJBi
function name:  call
number of ops:  7
compiled vars:  !0 = $fn, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    5     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_UNPACK                                              !1
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      1          
    6     6      > RETURN                                                   null

End of function call

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.29 ms | 1399 KiB | 14 Q