3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = json_decode('{"3":{"friend":45,"all":100},"2":{"friend":30,"all":50},"1":{"friend":25,"all":25}}'); $b = (array) $a; $n = '3'; var_dump($b); var_dump($b["3"]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0FV9u
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b, !2 = $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                                         $3      
         3        ASSIGN                                                   !0, $3
   3     4        CAST                                          7  ~5      !0
         5        ASSIGN                                                   !1, ~5
   4     6        ASSIGN                                                   !2, '3'
   5     7        INIT_FCALL                                               'var_dump'
         8        SEND_VAR                                                 !1
         9        DO_ICALL                                                 
   6    10        INIT_FCALL                                               'var_dump'
        11        FETCH_DIM_R                                      $9      !1, 3
        12        SEND_VAR                                                 $9
        13        DO_ICALL                                                 
        14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0