3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Some\TestNamespace; trait trait1 { public function method1() { echo __CLASS__; } } trait trait2 { public function method2() { $this->method1(); } } class class1 { use trait1; use trait2; } $obj = new class1; $obj->method1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5K3tF
function name:  (null)
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'some%5Ctestnamespace%5Cclass1'
   26     1        NEW                                              $1      'Some%5CTestNamespace%5Cclass1'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        INIT_METHOD_CALL                                         !0, 'method1'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Some\TestNamespace\trait1:
Function method1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5K3tF
function name:  method1
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_CLASS_NAME                                 ~0      
          1        ECHO                                                     ~0
    9     2      > RETURN                                                   null

End of function method1

End of class Some\TestNamespace\trait1.

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

End of function method2

End of class Some\TestNamespace\trait2.

Class Some\TestNamespace\class1: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.39 ms | 1393 KiB | 13 Q