3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataSet = array(array('id'=>7539, 'os'=>'Android'), array('id'=>7540, 'os'=>'iOS')); //foreach $ids = array(); foreach($dataSet as $data) { $ids[] = $data['id']; } echo implode(',', $ids); echo PHP_EOL; //array_column echo implode(',', array_column($dataSet, 'id'));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/WNMLX
function name:  (null)
number of ops:  25
compiled vars:  !0 = $dataSet, !1 = $ids, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, <array>
    7     2      > FE_RESET_R                                       $5      !0, ->8
          3    > > FE_FETCH_R                                               $5, !2, ->8
    8     4    >   FETCH_DIM_R                                      ~7      !2, 'id'
          5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  ~7
    7     7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $5
   11     9        INIT_FCALL                                               'implode'
         10        SEND_VAL                                                 '%2C'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        ECHO                                                     $8
   13    14        ECHO                                                     '%0A'
   15    15        INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '%2C'
         17        INIT_FCALL                                               'array_column'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 'id'
         20        DO_ICALL                                         $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                         $10     
         23        ECHO                                                     $10
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.11 ms | 1001 KiB | 15 Q