3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.15 ms | 940 KiB | 20 Q