3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { function foo($a = 1) { echo __METHOD__;} static function bar($a = 1) { echo __METHOD__;} } $x->foo(); // classic method call $x::foo(); // static method call on object X::foo(); // static method call on class name ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u6sH7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_METHOD_CALL                                         !0, 'foo'
          1        DO_FCALL                                      0          
    9     2        FETCH_CLASS                                   0  $2      !0
          3        INIT_STATIC_METHOD_CALL                                  $2, 'foo'
          4        DO_FCALL                                      0          
   10     5        INIT_STATIC_METHOD_CALL                                  'X', 'foo'
          6        DO_FCALL                                      0          
   12     7      > RETURN                                                   1

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

End of function foo

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

End of function bar

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.19 ms | 1448 KiB | 13 Q