3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MyTrait { final protected function someMethod(): void {} } class Test { use MyTrait { someMethod as private anotherMethod; } public function __construct() { $this->anotherMethod(); } } new Test;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YtW3h
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'test'
   20     1        NEW                                              $0      'Test'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
   21     4      > RETURN                                                   1

Class MyTrait:
Function somemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YtW3h
function name:  someMethod
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function somemethod

End of class MyTrait.

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YtW3h
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'anotherMethod'
          1        DO_FCALL                                      0          
   17     2      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.54 ms | 994 KiB | 13 Q