3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* The fatal error has been fixed in PHP 5.5.21 */ trait MyTrait { public function __construct() {} } class MyParent{ public function __construct() {} } class MyClass1 extends MyParent{ use MyTrait; } class MyClass2 extends MyParent { use MyTrait; } $o1 = new MyClass1; $o2 = new MyClass2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gcp9J
function name:  (null)
number of ops:  9
compiled vars:  !0 = $o1, !1 = $o2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            'myclass1', 'myparent'
   16     1        DECLARE_CLASS                                            'myclass2', 'myparent'
   20     2        NEW                                              $2      'MyClass1'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   21     5        NEW                                              $5      'MyClass2'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   22     8      > RETURN                                                   1

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

End of function __construct

End of class MyTrait.

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

End of function __construct

End of class MyParent.

Class MyClass1: [no user functions]
Class MyClass2: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
282.89 ms | 1002 KiB | 13 Q