3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum TKind { case TK_PUNCT; case TK_NUM; case TK_EOF; } class A{ public TKind $kind; public function __constructor($kindArg){ $this->kind = $kindArg; } } $a = new A(Tkind::TK_PUNCT); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18V1r
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                                'tkind'
   20     1        NEW                                                  $1      'A'
          2        FETCH_CLASS_CONSTANT                                 ~2      'Tkind', 'TK_PUNCT'
          3        SEND_VAL_EX                                                  ~2
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !0, $1
   21     6        INIT_FCALL                                                   'var_dump'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > RETURN                                                       1

Class TKind: [no user functions]
Class A:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18V1r
function name:  __constructor
number of ops:  4
compiled vars:  !0 = $kindArg
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   RECV                                                 !0      
   16     1        ASSIGN_OBJ                                                   'kind'
          2        OP_DATA                                                      !0
   17     3      > RETURN                                                       null

End of function __constructor

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.5 ms | 492 KiB | 10 Q