3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait foo { function A() { echo "Called"; } } class A { use foo; function __construct() { echo __CLASS__; } } $o = new A;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HEBMl
function name:  (null)
number of ops:  5
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                                'a'
   14     1        NEW                                                  $1      'A'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
          4      > RETURN                                                       1

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

End of function a

End of class foo.

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.17 ms | 3294 KiB | 13 Q