3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { protected $blah = 1; } class Bar { protected $blah = 2; use Foo; } $t = new Bar(); echo $t->blah;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sc62k
function name:  (null)
number of ops:  7
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   12     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   13     4        FETCH_OBJ_R                                      ~4      !0, 'blah'
          5        ECHO                                                     ~4
          6      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.61 ms | 1392 KiB | 13 Q