3v4l.org

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

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.08 ms | 1189 KiB | 13 Q