3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0=>"1:A", 1=>"2:B", 2=>"3:C", 3=>"4:D", 4=>"5:E", ); //处理 $array1 = array(); array_walk($array, function($val,$key,$fix) use(&$array1){ $v = explode($fix, $val); $array1[$v[1]] = $v[0]; },':'); var_dump($array1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FhW6J
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array, !1 = $array1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_walk'
          3        SEND_REF                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFhW6J%3A15%240'
          5        BIND_LEXICAL                                             ~4, !1
   18     6        SEND_VAL                                                 ~4
          7        SEND_VAL                                                 '%3A'
          8        DO_ICALL                                                 
   19     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFhW6J%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FhW6J
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $val, !1 = $key, !2 = $fix, !3 = $array1, !4 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        BIND_STATIC                                              !3
   16     4        INIT_FCALL                                               'explode'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !4, $5
   17     9        FETCH_DIM_R                                      ~7      !4, 1
         10        FETCH_DIM_R                                      ~9      !4, 0
         11        ASSIGN_DIM                                               !3, ~7
         12        OP_DATA                                                  ~9
   18    13      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFhW6J%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1396 KiB | 19 Q