3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"message":"yes","info":{"ID":1, "Items":[{"Name":" Jim"},{"Name":" Bob"}]}}'; $result = json_decode ($json); $arr = array(); foreach($result->info->Items as $value){ $arr[] = $value->Name; } echo implode(", ", $arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/qTAXb
function name:  (null)
number of ops:  21
compiled vars:  !0 = $json, !1 = $result, !2 = $arr, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22message%22%3A%22yes%22%2C%22info%22%3A%7B%22ID%22%3A1%2C+%22Items%22%3A%5B%7B%22Name%22%3A%22+Jim%22%7D%2C%7B%22Name%22%3A%22+Bob%22%7D%5D%7D%7D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        ASSIGN                                                   !2, <array>
    7     6        FETCH_OBJ_R                                      ~8      !1, 'info'
          7        FETCH_OBJ_R                                      ~9      ~8, 'Items'
          8      > FE_RESET_R                                       $10     ~9, ->14
          9    > > FE_FETCH_R                                               $10, !3, ->14
    8    10    >   FETCH_OBJ_R                                      ~12     !3, 'Name'
         11        ASSIGN_DIM                                               !2
         12        OP_DATA                                                  ~12
    7    13      > JMP                                                      ->9
         14    >   FE_FREE                                                  $10
   10    15        INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '%2C+'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $13     
         19        ECHO                                                     $13
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.62 ms | 1001 KiB | 15 Q