3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { private $test = 'works'; } class B { use A; public function __construct() { echo $this->test; } } new B();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LlYop
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'b'
   15     1        NEW                                              $0      'B'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
          4      > RETURN                                                   1

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

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.86 ms | 1393 KiB | 13 Q