3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "0 " : "test1" }'; // just decode that into an object $obj = json_decode($json); // recast it into an array $array = (array) $obj; // just dump to see the results var_dump($obj, $array, $array['0 '], $array[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1WRui
function name:  (null)
number of ops:  16
compiled vars:  !0 = $json, !1 = $obj, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B+%220+%22+%3A+%22test1%22+%7D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        CAST                                          7  ~6      !1
          6        ASSIGN                                                   !2, ~6
    8     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        FETCH_DIM_R                                      ~8      !2, '0+'
         11        SEND_VAL                                                 ~8
         12        FETCH_DIM_R                                      ~9      !2, 0
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.72 ms | 1394 KiB | 17 Q