3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass(); $a->{1} = 'Y'; $x = unserialize(serialize($a)); $prop = 1; var_dump($x->$prop);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5vVRY
function name:  (null)
number of ops:  18
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, '1'
          4        OP_DATA                                                  'Y'
    4     5        INIT_FCALL                                               'unserialize'
          6        INIT_FCALL                                               'serialize'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !1, $8
    5    12        ASSIGN                                                   !2, 1
    6    13        INIT_FCALL                                               'var_dump'
         14        FETCH_OBJ_R                                      ~11     !1, !2
         15        SEND_VAL                                                 ~11
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.93 ms | 1394 KiB | 19 Q