3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array('name' => 'infotel', 'value' => '+39080123456' ), array('name' => 'location', 'value' => 'Bari') ); $arr = array_column($array, 'value', 'name'); array_walk($arr, function(&$v, $k) { if ($k == 'infotel') $telephone = $v; elseif ($k == 'location') $city = $v; }); echo $telephone; echo "\n"; echo $city;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FEWQF
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $arr, !2 = $telephone, !3 = $city
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'value'
          4        SEND_VAL                                                 'name'
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    9     7        INIT_FCALL                                               'array_walk'
          8        SEND_REF                                                 !1
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFEWQF%3A9%240'
   12    10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
   14    12        ECHO                                                     !2
   15    13        ECHO                                                     '%0A'
   16    14        ECHO                                                     !3
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFEWQF%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/FEWQF
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $v, !1 = $k, !2 = $telephone, !3 = $city
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        IS_EQUAL                                                 !1, 'infotel'
          3      > JMPZ                                                     ~4, ->6
          4    >   ASSIGN                                                   !2, !0
          5      > JMP                                                      ->9
   11     6    >   IS_EQUAL                                                 !1, 'location'
          7      > JMPZ                                                     ~6, ->9
          8    >   ASSIGN                                                   !3, !0
   12     9    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFEWQF%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.3 ms | 1401 KiB | 17 Q