3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.32 ms | 1395 KiB | 17 Q