3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "39X3,29X5,932X15"; $out = array(); foreach(explode(",", $data) as $key=>$item){ $exp = explode('X', $item); $out[$key] = [ 'number' => $exp[0], 'prize' => $exp[1] ]; } print_r($out);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/6WP9Z
function name:  (null)
number of ops:  26
compiled vars:  !0 = $data, !1 = $out, !2 = $item, !3 = $key, !4 = $exp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '39X3%2C29X5%2C932X15'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6      > FE_RESET_R                                       $8      $7, ->21
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->21
          8    >   ASSIGN                                                   !3, ~9
    6     9        INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 'X'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !4, $11
    8    14        FETCH_DIM_R                                      ~14     !4, 0
         15        INIT_ARRAY                                       ~15     ~14, 'number'
    9    16        FETCH_DIM_R                                      ~16     !4, 1
         17        ADD_ARRAY_ELEMENT                                ~15     ~16, 'prize'
    7    18        ASSIGN_DIM                                               !1, !3
    9    19        OP_DATA                                                  ~15
    5    20      > JMP                                                      ->7
         21    >   FE_FREE                                                  $8
   13    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.51 ms | 1395 KiB | 17 Q