3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'ID=62981155;IT=OV80419674-62981155_1_3;OD=15.4;|ID=62981157;IT=OV80419674-62981157_1_3;OD=3.1;|ID=62981159;IT=OV80419674-62981159_1_3;OD=8.13;|'; $result = []; foreach (explode('|', rtrim(strtr($str, ';', '&'), '|')) as $set) { parse_str($set, $result[]); } echo json_encode($result, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 23
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/2nUaO
function name:  (null)
number of ops:  30
compiled vars:  !0 = $str, !1 = $result, !2 = $set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ID%3D62981155%3BIT%3DOV80419674-62981155_1_3%3BOD%3D15.4%3B%7CID%3D62981157%3BIT%3DOV80419674-62981157_1_3%3BOD%3D3.1%3B%7CID%3D62981159%3BIT%3DOV80419674-62981159_1_3%3BOD%3D8.13%3B%7C'
    5     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%7C'
          4        INIT_FCALL                                               'rtrim'
          5        INIT_FCALL                                               'strtr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '%3B'
          8        SEND_VAL                                                 '%26'
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        SEND_VAL                                                 '%7C'
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15      > FE_RESET_R                                       $8      $7, ->23
         16    > > FE_FETCH_R                                               $8, !2, ->23
    7    17    >   INIT_FCALL                                               'parse_str'
         18        SEND_VAR                                                 !2
         19        FETCH_DIM_W                                      $9      !1
         20        SEND_REF                                                 $9
         21        DO_ICALL                                                 
    6    22      > JMP                                                      ->16
         23    >   FE_FREE                                                  $8
    9    24        INIT_FCALL                                               'json_encode'
         25        SEND_VAR                                                 !1
         26        SEND_VAL                                                 160
         27        DO_ICALL                                         $11     
         28        ECHO                                                     $11
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.72 ms | 1003 KiB | 18 Q