3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = "899.3MB 976.4MB 874.7MB 985.6MB 1.2GB 691.3MB 1.4GB 975.4MB 1.0GB 712.8MB 879.8MB 908.6MB 912.1MB 887.5MB 950.4MB 1.4GB 749.9MB 851.2MB 750.8MB 813.7MB 1.2GB 700MB 998.5MB 1010.8MB 989.7MB 1.1GB 797.5MB 699.5MB 683.7MB 1.0GB 958.2MB 1.1GB 1.0GB 1.0GB 1.0GB 1.1GB 1.0GB 1.0GB 846MB 873MB 753MB 1.1GB 970MB 749.9MB 750MB 650MB 845MB 1.1GB 1.3GB 1.2GB 1.1GB 867MB 940MB 946MB 909MB 909MB 913MB 893MB 892MB 889MB 730MB 848MB 855MB 1.15GB 853MB 765MB 1.2GB 863MB 838MB 753MB 960MB 868MB 967MB 1.06GB 751MB 1GB 1.2GB 920MB 1.2GB 897MB 1009.15MB 764MB 694MB 967MB 989.9MB 898MB 938MB 879.76MB 879.76MB 999.78MB 1.3GB 1.1GB 1.09GB"; $result = []; foreach (explode(' ', $data) as $value) { [$unit, $result[$unit][]] = array_reverse(sscanf($value, '%f%s')); } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 23
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 23
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/t2oTj
function name:  (null)
number of ops:  28
compiled vars:  !0 = $data, !1 = $result, !2 = $value, !3 = $unit
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '899.3MB+976.4MB+874.7MB+985.6MB+1.2GB+691.3MB+1.4GB+975.4MB+1.0GB+712.8MB+879.8MB+908.6MB+912.1MB+887.5MB+950.4MB+1.4GB+749.9MB+851.2MB+750.8MB+813.7MB+1.2GB+700MB+998.5MB+1010.8MB+989.7MB+1.1GB+797.5MB+699.5MB+683.7MB+1.0GB+958.2MB+1.1GB+1.0GB+1.0GB+1.0GB+1.1GB+1.0GB+1.0GB+846MB+873MB+753MB+1.1GB+970MB+749.9MB+750MB+650MB+845MB+1.1GB+1.3GB+1.2GB+1.1GB+867MB+940MB+946MB+909MB+909MB+913MB+893MB+892MB+889MB+730MB+848MB+855MB+1.15GB+853MB+765MB+1.2GB+863MB+838MB+753MB+960MB+868MB+967MB+1.06GB+751MB+1GB+1.2GB+920MB+1.2GB+897MB+1009.15MB+764MB+694MB+967MB+989.9MB+898MB+938MB+879.76MB+879.76MB+999.78MB+1.3GB+1.1GB+1.09GB'
    5     1        ASSIGN                                                       !1, <array>
    6     2        INIT_FCALL                                                   'explode'
          3        SEND_VAL                                                     '+'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $6      
          6      > FE_RESET_R                                           $7      $6, ->23
          7    > > FE_FETCH_R                                                   $7, !2, ->23
    7     8    >   INIT_FCALL                                                   'array_reverse'
          9        INIT_FCALL                                                   'sscanf'
         10        SEND_VAR                                                     !2
         11        SEND_VAL                                                     '%25f%25s'
         12        DO_ICALL                                             $8      
         13        SEND_VAR                                                     $8
         14        DO_ICALL                                             $9      
         15        FETCH_LIST_R                                         $10     $9, 0
         16        ASSIGN                                                       !3, $10
         17        FETCH_LIST_R                                         $12     $9, 1
         18        FETCH_DIM_W                                          $13     !1, !3
         19        ASSIGN_DIM                                                   $13
         20        OP_DATA                                                      $12
         21        FREE                                                         $9
    6    22      > JMP                                                          ->7
         23    >   FE_FREE                                                      $7
    9    24        INIT_FCALL                                                   'var_export'
         25        SEND_VAR                                                     !1
         26        DO_ICALL                                                     
         27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.24 ms | 482 KiB | 11 Q