3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array ( 'prd' => array ( 0 => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5', 5 => '6', 6 => '7', 7 => '8', ), 'price' => array ( 0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f', 6 => 'g', 7 => 'h', ) ); $data = array_combine($data['prd'], $data['price']); #for ($x = 0; $x< count($data['prd']); $x++) { # echo $data['prd'][$x] . " costs " . $data['price'][$x] . PHP_EOL; #} foreach($data as $key => $val) { echo $key . $val; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/aXGlB
function name:  (null)
number of ops:  16
compiled vars:  !0 = $data, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   25     1        INIT_FCALL                                               'array_combine'
          2        FETCH_DIM_R                                      ~4      !0, 'prd'
          3        SEND_VAL                                                 ~4
          4        FETCH_DIM_R                                      ~5      !0, 'price'
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !0, $6
   30     8      > FE_RESET_R                                       $8      !0, ->14
          9    > > FE_FETCH_R                                       ~9      $8, !1, ->14
         10    >   ASSIGN                                                   !2, ~9
   31    11        CONCAT                                           ~11     !2, !1
         12        ECHO                                                     ~11
   30    13      > JMP                                                      ->9
         14    >   FE_FREE                                                  $8
   32    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.81 ms | 1395 KiB | 15 Q