3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass {} $c = new MyClass(); $y = new ArrayObject($c); $y['foo'] = 'bar'; // <-- should emit deprecation warning $c->foo2 = 2; var_export($c); echo "\n"; readonly class ReadOnly_ {} $r = new ReadOnly_(); $z = new ArrayObject($r); $z['foo'] = 'bar'; var_export($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cjfAF
function name:  (null)
number of ops:  28
compiled vars:  !0 = $c, !1 = $y, !2 = $r, !3 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $4      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    5     3        NEW                                              $7      'ArrayObject'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
    6     7        ASSIGN_DIM                                               !1, 'foo'
          8        OP_DATA                                                  'bar'
    7     9        ASSIGN_OBJ                                               !0, 'foo2'
         10        OP_DATA                                                  2
    8    11        INIT_FCALL                                               'var_export'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14        ECHO                                                     '%0A'
   11    15        NEW                                              $13     'ReadOnly_'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $13
   12    18        NEW                                              $16     'ArrayObject'
         19        SEND_VAR_EX                                              !2
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !3, $16
   13    22        ASSIGN_DIM                                               !3, 'foo'
         23        OP_DATA                                                  'bar'
   14    24        INIT_FCALL                                               'var_export'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Class MyClass: [no user functions]
Class ReadOnly_: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.89 ms | 1005 KiB | 14 Q