3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.64 ms | 1385 KiB | 15 Q