3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { public $first_var = "hello"; } class don{ use A{ A::first_var as public second_var; } public function dis(){ echo $this->second_var; } } $do = new don(); echo $do->dis(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4rTpY
function name:  (null)
number of ops:  8
compiled vars:  !0 = $do
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                            'don'
   24     1        NEW                                              $1      'don'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   25     4        INIT_METHOD_CALL                                         !0, 'dis'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   27     7      > RETURN                                                   1

Class A: [no user functions]
Class don:
Function dis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4rTpY
function name:  dis
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_OBJ_R                                      ~0      'second_var'
          1        ECHO                                                     ~0
   19     2      > RETURN                                                   null

End of function dis

End of class don.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.68 ms | 1397 KiB | 13 Q