3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface i { function foo($a); } class x { function foo() {} } class y extends x implements i { function foo($a = 1) { echo __METHOD__; } } (new y)->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbOm6
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                                'y', 'x'
   15     1        NEW                                                  $0      'y'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'foo'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

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

End of function foo

End of class i.

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

End of function foo

End of class x.

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

End of function foo

End of class y.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.33 ms | 1160 KiB | 13 Q