3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = json_decode('{"3":{"friend":45,"all":100},"2":{"friend":30,"all":50},"1":{"friend":25,"all":25}}'); $arr = array(); foreach ($a as $key => $value) { $arr[$key] = $value; } var_dump($arr); $n = 3; var_dump($arr[$n]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/DZVJ1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $arr, !2 = $value, !3 = $key, !4 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%223%22%3A%7B%22friend%22%3A45%2C%22all%22%3A100%7D%2C%222%22%3A%7B%22friend%22%3A30%2C%22all%22%3A50%7D%2C%221%22%3A%7B%22friend%22%3A25%2C%22all%22%3A25%7D%7D'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    4     4        ASSIGN                                                   !1, <array>
    5     5      > FE_RESET_R                                       $8      !0, ->11
          6    > > FE_FETCH_R                                       ~9      $8, !2, ->11
          7    >   ASSIGN                                                   !3, ~9
    6     8        ASSIGN_DIM                                               !1, !3
          9        OP_DATA                                                  !2
    5    10      > JMP                                                      ->6
         11    >   FE_FREE                                                  $8
    8    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
    9    15        ASSIGN                                                   !4, 3
   10    16        INIT_FCALL                                               'var_dump'
         17        FETCH_DIM_R                                      ~14     !1, !4
         18        SEND_VAL                                                 ~14
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.27 ms | 1395 KiB | 17 Q