3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace My\Vendor { class Test { use \Traits\Test; } new Test; } namespace Traits { trait Test { public function __construct() { echo self::class; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NQQEk
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'my%5Cvendor%5Ctest'
    7     1        NEW                                                  $0      'My%5CVendor%5CTest'
          2        DO_FCALL                                          0          
          3        FREE                                                         $0
   14     4      > RETURN                                                       1

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

End of function __construct

End of class Traits\Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.27 ms | 2519 KiB | 13 Q