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 = $decoded->data->items; $n = 1; var_dump($items->$n);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Epca6
function name:  (null)
number of ops:  18
compiled vars:  !0 = $params, !1 = $encoded, !2 = $decoded, !3 = $items, !4 = $n
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                                         $6      
          4        ASSIGN                                                   !1, $6
   16     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
   18     9        FETCH_OBJ_R                                      ~10     !2, 'data'
         10        FETCH_OBJ_R                                      ~11     ~10, 'items'
         11        ASSIGN                                                   !3, ~11
   19    12        ASSIGN                                                   !4, 1
   20    13        INIT_FCALL                                               'var_dump'
         14        FETCH_OBJ_R                                      ~14     !3, !4
         15        SEND_VAL                                                 ~14
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.9 ms | 1394 KiB | 19 Q