3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait t { function c() { var_dump(__METHOD__); } } class c { use t; function __construct() { var_dump(__METHOD__); } } $o = new c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G7DOC
function name:  (null)
number of ops:  5
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'c'
   16     1        NEW                                              $1      'c'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class t:
Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G7DOC
function name:  c
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 't%3A%3Ac'
          2        DO_ICALL                                                 
    5     3      > RETURN                                                   null

End of function c

End of class t.

Class c:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G7DOC
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'c%3A%3A__construct'
          2        DO_ICALL                                                 
   13     3      > RETURN                                                   null

End of function __construct

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.49 ms | 997 KiB | 14 Q