3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait foo { public $prop = "foo"; } class bar { use foo; public $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/WCtFn
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'bar'
   15     1        NEW                                              $1      'bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        INIT_METHOD_CALL                                         !0, 'show'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class foo: [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/WCtFn
function name:  show
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     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:
148.92 ms | 1384 KiB | 13 Q