3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { protected $prop = "foo"; } class Bar { use T; protected $prop = "bar"; public function show(){ echo $this->prop; } } $x = new Bar; $x->show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lPFpL
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'bar'
   14     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_METHOD_CALL                                         !0, 'show'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function show

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.06 ms | 1393 KiB | 13 Q