3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public readonly int $v; } $a = new A; $b = new ArrayObject($a); $b['v'] = 'hello'; $b['v'] = 'world'; echo $a->v; //"world"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5UYWZ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        NEW                                              $5      'ArrayObject'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
    6     7        ASSIGN_DIM                                               !1, 'v'
          8        OP_DATA                                                  'hello'
    7     9        ASSIGN_DIM                                               !1, 'v'
         10        OP_DATA                                                  'world'
    8    11        FETCH_OBJ_R                                      ~10     !0, 'v'
         12        ECHO                                                     ~10
         13      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.16 ms | 1001 KiB | 13 Q