3v4l.org

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

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9l5FZ
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'trait'
    7     1      > RETURN                                                   null

End of function __construct

End of class Test.

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9l5FZ
function name:  __construct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'class'
   16     1      > RETURN                                                   null

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.78 ms | 1393 KiB | 13 Q