3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array ( 0 => array ( 'Code1' => 'M22', 'Code2' => 'M33', 'Code3' => 'S44' ), 1 => array ( 'Code1' => 'E22', 'Code2' => 'E33', 'Code3' => 'E44' ) ); $code2values = array_column($data, 'Code2'); $code3values = array_column($data, 'Code3'); foreach ($code2values as $key => $code2) { $code3 = $code3values[$key]; // do something with $code2 and $code3 echo "code2: $code2, code3: $code3\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 23
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 23
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/65vqG
function name:  (null)
number of ops:  25
compiled vars:  !0 = $data, !1 = $code2values, !2 = $code3values, !3 = $code2, !4 = $key, !5 = $code3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'Code2'
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
   19     6        INIT_FCALL                                               'array_column'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 'Code3'
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
   20    11      > FE_RESET_R                                       $11     !1, ->23
         12    > > FE_FETCH_R                                       ~12     $11, !3, ->23
         13    >   ASSIGN                                                   !4, ~12
   21    14        FETCH_DIM_R                                      ~14     !2, !4
         15        ASSIGN                                                   !5, ~14
   23    16        ROPE_INIT                                     5  ~17     'code2%3A+'
         17        ROPE_ADD                                      1  ~17     ~17, !3
         18        ROPE_ADD                                      2  ~17     ~17, '%2C+code3%3A+'
         19        ROPE_ADD                                      3  ~17     ~17, !5
         20        ROPE_END                                      4  ~16     ~17, '%0A'
         21        ECHO                                                     ~16
   20    22      > JMP                                                      ->12
         23    >   FE_FREE                                                  $11
   24    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
266.37 ms | 1010 KiB | 14 Q