3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar(&$reference) { print "x\n";} static function baz() { print "y\n";} } $x = new foo; $function = array($x, "bar"); $function($x); $function = array('foo', "baz"); $function();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZIUCa
function name:  (null)
number of ops:  13
compiled vars:  !0 = $x, !1 = $function
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        INIT_ARRAY                                       ~5      !0
          4        ADD_ARRAY_ELEMENT                                ~5      'bar'
          5        ASSIGN                                                   !1, ~5
    8     6        INIT_DYNAMIC_CALL                                        !1
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
    9     9        ASSIGN                                                   !1, <array>
   10    10        INIT_DYNAMIC_CALL                                        !1
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZIUCa
function name:  bar
number of ops:  3
compiled vars:  !0 = $reference
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ECHO                                                     'x%0A'
          2      > RETURN                                                   null

End of function bar

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

End of function baz

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.95 ms | 1394 KiB | 13 Q