3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->{0} = 'X'; $a->{1} = 'Y'; $x = unserialize(serialize($a)); $prop = 1; var_dump($x->$prop, $x->{1});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7gB4s
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $x, !2 = $prop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN_OBJ                                               !0, '0'
          4        OP_DATA                                                  'X'
    4     5        ASSIGN_OBJ                                               !0, '1'
          6        OP_DATA                                                  'Y'
    5     7        INIT_FCALL                                               'unserialize'
          8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !1, $9
    6    14        ASSIGN                                                   !2, 1
    7    15        INIT_FCALL                                               'var_dump'
         16        FETCH_OBJ_R                                      ~12     !1, !2
         17        SEND_VAL                                                 ~12
         18        FETCH_OBJ_R                                      ~13     !1, '1'
         19        SEND_VAL                                                 ~13
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.55 ms | 1395 KiB | 19 Q