3v4l.org

run code in 500+ PHP versions simultaneously
<?php class c { function __construct(public int $answer) { } } class_alias('c', ''); $o = new ('')(42); echo $o->answer;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQL18
function name:  (null)
number of ops:  11
compiled vars:  !0 = $o
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'class_alias'
          1        SEND_VAL                                                     'c'
          2        SEND_VAL                                                     ''
          3        DO_ICALL                                                     
    9     4        NEW                                                  $2      ''
          5        SEND_VAL_EX                                                  42
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !0, $2
   11     8        FETCH_OBJ_R                                          ~5      !0, 'answer'
          9        ECHO                                                         ~5
   12    10      > RETURN                                                       1

Class c:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQL18
function name:  __construct
number of ops:  4
compiled vars:  !0 = $answer
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        ASSIGN_OBJ                                                   'answer'
          2        OP_DATA                                                      !0
          3      > RETURN                                                       null

End of function __construct

End of class c.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.41 ms | 2791 KiB | 9 Q