3v4l.org

run code in 500+ PHP versions simultaneously
<?php class B { protected function c() { return 1; } } class C1 extends B { function f(B $x) { return $x->c(); } } class C2 extends B { protected function c() { return 2; } } var_dump((new C1)->f(new C2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LmLLu
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                                   'var_dump'
          1        NEW                                                  $0      'C1'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'f'
          4        NEW                                                  $2      'C2'
          5        DO_FCALL                                          0          
          6        SEND_VAR_NO_REF_EX                                           $2
          7        DO_FCALL                                          0  $4      
          8        SEND_VAR                                                     $4
          9        DO_ICALL                                                     
         10      > RETURN                                                       1

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

End of function c

End of class B.

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

End of function f

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

End of function c

End of class C1.

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

End of function c

End of class C2.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.62 ms | 1445 KiB | 14 Q