3v4l.org

run code in 500+ PHP versions simultaneously
<?php class P { protected $v = 1; } class C extends P { public function test(P $i) { return $i->v; } } class C2 extends P { protected $v = 2; } $c = new C; $c2 = new C2; $c->test($c2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R3Q8D
function name:  (null)
number of ops:  10
compiled vars:  !0 = $c, !1 = $c2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   NEW                                                  $2      'C'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   17     3        NEW                                                  $5      'C2'
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !1, $5
   18     6        INIT_METHOD_CALL                                             !0, 'test'
          7        SEND_VAR_EX                                                  !1
          8        DO_FCALL                                          0          
          9      > RETURN                                                       1

Class P: [no user functions]
Class C:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R3Q8D
function name:  test
number of ops:  4
compiled vars:  !0 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1        FETCH_OBJ_R                                          ~1      !0, 'v'
          2      > RETURN                                                       ~1
    9     3*     > RETURN                                                       null

End of function test

End of class C.

Class C2: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.08 ms | 3377 KiB | 13 Q