3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait test { public function method1() { echo __CLASS__; } } class class1 { use test; } $obj = new class1; $obg->method1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hTjTI
function name:  (null)
number of ops:  7
compiled vars:  !0 = $obj, !1 = $obg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'class1'
   15     1        NEW                                              $2      'class1'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   16     4        INIT_METHOD_CALL                                         !1, 'method1'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function method1

End of class test.

Class class1: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.93 ms | 1393 KiB | 13 Q