3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { function x(self $o); } class B implements A { function x(self $o) { return $o; } } class C extends B { } $c = new C(); var_dump($c->x($c));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FU3BJ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'b'
   13     1        DECLARE_CLASS                                            'c', 'b'
   17     2        NEW                                              $1      'C'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   19     5        INIT_FCALL                                               'var_dump'
          6        INIT_METHOD_CALL                                         !0, 'x'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function x

End of class A.

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

End of function x

End of class B.

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.87 ms | 1395 KiB | 15 Q