3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = json_decode('{"id":[{"id":"217448625"},{"id":"177484962"},{"id":"575507011"},{"id":"162589600"},{"id":"339801850"},{"id":"806588415"},{"id":"442404184"},{"id":"107993689"}]}'); //print_r($array); var_dump($array['id']); $i=0; foreach ($array as $element) $newArray[0] = $element[0]['id']; var_export($newArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/e0Th2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $i, !2 = $element, !3 = $newArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%22id%22%3A%5B%7B%22id%22%3A%22217448625%22%7D%2C%7B%22id%22%3A%22177484962%22%7D%2C%7B%22id%22%3A%22575507011%22%7D%2C%7B%22id%22%3A%22162589600%22%7D%2C%7B%22id%22%3A%22339801850%22%7D%2C%7B%22id%22%3A%22806588415%22%7D%2C%7B%22id%22%3A%22442404184%22%7D%2C%7B%22id%22%3A%22107993689%22%7D%5D%7D'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    6     4        INIT_FCALL                                               'var_dump'
          5        FETCH_DIM_R                                      ~6      !0, 'id'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
    8     8        ASSIGN                                                   !1, 0
    9     9      > FE_RESET_R                                       $9      !0, ->16
         10    > > FE_FETCH_R                                               $9, !2, ->16
   10    11    >   FETCH_DIM_R                                      ~11     !2, 0
         12        FETCH_DIM_R                                      ~12     ~11, 'id'
         13        ASSIGN_DIM                                               !3, 0
         14        OP_DATA                                                  ~12
    9    15      > JMP                                                      ->10
         16    >   FE_FREE                                                  $9
   12    17        INIT_FCALL                                               'var_export'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.49 ms | 1395 KiB | 19 Q