3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* data (var_export) array ( 'id' => '183970', 'player1' => 'Weird', 'player2' => 'Bloodbuddy', 'player1_items' => '644:204,10:200000,', 'player2_items' => '38:200,', )array ( 'id' => '183969', 'player1' => 'Frog', 'player2' => 'Eh', 'player1_items' => '656:1,11:3797,33:1111,42:200,40:100,31:1111,1263:1,522:1,', 'player2_items' => '405:1,', ) */ $item = ['id' => '183970', 'player1' => 'Weird', 'player2' => 'Bloodbuddy', 'player1_items' => '644:204,10:200000,', 'player2_items' => '38:200,', ]; $player1_items = explode(':', $item['player1_items']); foreach ($player1_items as $key => $value) { echo $value; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/TuaAm
function name:  (null)
number of ops:  14
compiled vars:  !0 = $item, !1 = $player1_items, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3A'
          3        FETCH_DIM_R                                      ~5      !0, 'player1_items'
          4        SEND_VAL                                                 ~5
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    9     7      > FE_RESET_R                                       $8      !1, ->12
          8    > > FE_FETCH_R                                       ~9      $8, !2, ->12
          9    >   ASSIGN                                                   !3, ~9
   11    10        ECHO                                                     !2
    9    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $8
   12    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.21 ms | 1394 KiB | 15 Q