3v4l.org

run code in 500+ PHP versions simultaneously
<?php $input = '{ "0": "data" }'; $result = json_decode($input); var_dump($result->{"0"}); $result->{"0"} = 1; var_dump($result->{"0"}); var_dump($result); // NULL
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sJo8p
function name:  (null)
number of ops:  19
compiled vars:  !0 = $input, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7B+%220%22%3A+%22data%22+%7D'
    6     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $3      
          4        ASSIGN                                                       !1, $3
    8     5        INIT_FCALL                                                   'var_dump'
          6        FETCH_OBJ_R                                          ~5      !1, '0'
          7        SEND_VAL                                                     ~5
          8        DO_ICALL                                                     
    9     9        ASSIGN_OBJ                                                   !1, '0'
         10        OP_DATA                                                      1
   10    11        INIT_FCALL                                                   'var_dump'
         12        FETCH_OBJ_R                                          ~8      !1, '0'
         13        SEND_VAL                                                     ~8
         14        DO_ICALL                                                     
   12    15        INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !1
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.99 ms | 2702 KiB | 15 Q