3v4l.org

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

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

End of function see

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.59 ms | 1393 KiB | 13 Q