3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait test{ public $var = "sa"; } class test2{ use test; public function myfunc(){ return $this->var; } } $obj = new test2; echo $obj->myfunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j6bov
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'test2'
   22     1        NEW                                              $1      'test2'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   23     4        INIT_METHOD_CALL                                         !0, 'myfunc'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

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

End of function myfunc

End of class test2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.12 ms | 1393 KiB | 13 Q