3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { public readonly int $property; } class y extends x { function __construct() { $this->property = 5; } } $x = new x; echo $x->property;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WtXbB
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   NEW                                                  $1      'x'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   14     3        FETCH_OBJ_R                                          ~4      !0, 'property'
          4        ECHO                                                         ~4
   15     5      > RETURN                                                       1

Class x: [no user functions]
Class y:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WtXbB
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                                   'property'
          1        OP_DATA                                                      5
   10     2      > RETURN                                                       null

End of function __construct

End of class y.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.66 ms | 3399 KiB | 13 Q