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); $r = new ReflectionObject($x); var_dump($r->getProperties());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4GIAE
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $x, !2 = $prop, !3 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    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                                         $8      
          9        SEND_VAR                                                 $8
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !1, $9
    5    12        ASSIGN                                                   !2, 1
    6    13        INIT_FCALL                                               'var_dump'
         14        FETCH_OBJ_R                                      ~12     !1, !2
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                                 
    8    17        NEW                                              $14     'ReflectionObject'
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $14
    9    21        INIT_FCALL                                               'var_dump'
         22        INIT_METHOD_CALL                                         !3, 'getProperties'
         23        DO_FCALL                                      0  $17     
         24        SEND_VAR                                                 $17
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.56 ms | 936 KiB | 20 Q