3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = array( 'data' => array( 'total_shipping_amount' => 100, 'items' => array( 1 => 10, 2 => 20, 3 => 70, ) ) ); $encoded = json_encode($params); $decoded = json_decode($encoded); $items = get_object_vars($decoded->data->items); var_dump($items); var_dump($params['data']['items'][1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GD77j
function name:  (null)
number of ops:  25
compiled vars:  !0 = $params, !1 = $encoded, !2 = $decoded, !3 = $items
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   16     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
   18     9        INIT_FCALL                                               'get_object_vars'
         10        FETCH_OBJ_R                                      ~9      !2, 'data'
         11        FETCH_OBJ_R                                      ~10     ~9, 'items'
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !3, $11
   19    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   20    18        INIT_FCALL                                               'var_dump'
         19        FETCH_DIM_R                                      ~14     !0, 'data'
         20        FETCH_DIM_R                                      ~15     ~14, 'items'
         21        FETCH_DIM_R                                      ~16     ~15, 1
         22        SEND_VAL                                                 ~16
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.99 ms | 1395 KiB | 21 Q