3v4l.org

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

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

End of function getname

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.42 ms | 1393 KiB | 13 Q