3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0 => "TEST ", 1 => "1 ", 2 => "2 ", 3 => "3 "]; $temp = array_shift($arr); $res = []; foreach ($arr as $key => $value) { $res['arr'.$key] = ["NAME" => $temp, "VALUE" => $value]; } extract($res); print_r($arr0); print_r($arr1); print_r($arr2);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/XYLGI
function name:  (null)
number of ops:  29
compiled vars:  !0 = $arr, !1 = $temp, !2 = $res, !3 = $value, !4 = $key, !5 = $arr0, !6 = $arr1, !7 = $arr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $9      
          4        ASSIGN                                                   !1, $9
    4     5        ASSIGN                                                   !2, <array>
    5     6      > FE_RESET_R                                       $12     !0, ->15
          7    > > FE_FETCH_R                                       ~13     $12, !3, ->15
          8    >   ASSIGN                                                   !4, ~13
    6     9        CONCAT                                           ~15     'arr', !4
         10        INIT_ARRAY                                       ~17     !1, 'NAME'
         11        ADD_ARRAY_ELEMENT                                ~17     !3, 'VALUE'
         12        ASSIGN_DIM                                               !2, ~15
         13        OP_DATA                                                  ~17
    5    14      > JMP                                                      ->7
         15    >   FE_FREE                                                  $12
    8    16        INIT_FCALL                                               'extract'
         17        SEND_REF                                                 !2
         18        DO_ICALL                                                 
    9    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !5
         21        DO_ICALL                                                 
   10    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !6
         24        DO_ICALL                                                 
   11    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !7
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.01 ms | 1001 KiB | 16 Q