3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function doFoo() { echo 'foo'; } } function run(callable $callback) { $callback(); } $doFoo1 = array('Foo', 'doFoo'); $doFoo2 = 'Foo::doFoo'; run($doFoo1); run($doFoo2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YdVf7
function name:  (null)
number of ops:  9
compiled vars:  !0 = $doFoo1, !1 = $doFoo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   18     1        ASSIGN                                                   !1, 'Foo%3A%3AdoFoo'
   20     2        INIT_FCALL                                               'run'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
   21     5        INIT_FCALL                                               'run'
          6        SEND_VAR                                                 !1
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YdVf7
function name:  run
number of ops:  4
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0          
   15     3      > RETURN                                                   null

End of function run

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

End of function dofoo

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.8 ms | 1397 KiB | 15 Q