3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
223.81 ms | 1395 KiB | 17 Q