3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Using a negative number $array = array ( '0' => array ( 'name' => 'firt_name', 'value' => 'Robin' ) , '1' => array ( 'name' => 'last_name', 'value' => 'Singh' ) , '2' => array ( 'name' => 'email', 'value' => '123@gmail.com' ) , '3' => array ( 'name' => 'password', 'value' => '12345', ) , '4' => array ( 'name' => 'phone', 'value' => 'skdsjdkdjskd' ) , '5' => Array ( 'name' => 'city', 'value' => 'dskjdksjd' ) , '6' => Array ( 'name' => 'state', 'value' => 'kjksdjskdsk' ) ); $result = []; foreach($array as $k=>$v){ $result[$v['name']] = $v['value']; } print_r($result); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/hH39i
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array, !1 = $result, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   49     1        ASSIGN                                                   !1, <array>
   50     2      > FE_RESET_R                                       $6      !0, ->10
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->10
          4    >   ASSIGN                                                   !3, ~7
   51     5        FETCH_DIM_R                                      ~9      !2, 'name'
          6        FETCH_DIM_R                                      ~11     !2, 'value'
          7        ASSIGN_DIM                                               !1, ~9
          8        OP_DATA                                                  ~11
   50     9      > JMP                                                      ->3
         10    >   FE_FREE                                                  $6
   53    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   54    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.42 ms | 1009 KiB | 14 Q