3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "Apr 21 08:45 AM,RediMed Northeast,15,2015-04-21 08:00:00.000,2015-04-21 08:04:00.000,2015-04-21 08:17:00.000,2015-04-21 08:17:00.000,90 minutes Apr 21 08:45 AM,RediMed North,14,2015-04-21 08:00:00.000,2015-04-21 08:22:00.000,2015-04-21 08:27:00.000,2015-04-21 00:00:00.000,90 minutes Apr 21 09:00 AM,RediMed Northeast,15,2015-04-21 08:00:00.000,2015-04-21 08:04:00.000,2015-04-21 08:17:00.000,2015-04-21 08:17:00.000,90 minutes Apr 21 09:00 AM,RediMed North,14,2015-04-21 08:00:00.000,2015-04-21 08:13:00.000,2015-04-21 08:17:00.000,2015-04-21 08:25:00.000,90 minutes"; $data = explode("\n", $data); $csv = array_map('str_getcsv', $data); foreach ($csv as $v) { $v[0] = strtotime($v[0]); } $retunr = array(); foreach ($csv as $key => $value) { $return[$value[0]][] = $value[0]; } foreach ($return as $key => $value) { echo implode(',', $value)." ".$key; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 20
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 20
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 31
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 43
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 43
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 31
Branch analysis from position: 20
filename:       /in/VOpA0
function name:  (null)
number of ops:  45
compiled vars:  !0 = $data, !1 = $csv, !2 = $v, !3 = $retunr, !4 = $value, !5 = $key, !6 = $return
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Apr+21+08%3A45+AM%2CRediMed+Northeast%2C15%2C2015-04-21+08%3A00%3A00.000%2C2015-04-21+08%3A04%3A00.000%2C2015-04-21+08%3A17%3A00.000%2C2015-04-21+08%3A17%3A00.000%2C90+minutes%0AApr+21+08%3A45+AM%2CRediMed+North%2C14%2C2015-04-21+08%3A00%3A00.000%2C2015-04-21+08%3A22%3A00.000%2C2015-04-21+08%3A27%3A00.000%2C2015-04-21+00%3A00%3A00.000%2C90+minutes%0AApr+21+09%3A00+AM%2CRediMed+Northeast%2C15%2C2015-04-21+08%3A00%3A00.000%2C2015-04-21+08%3A04%3A00.000%2C2015-04-21+08%3A17%3A00.000%2C2015-04-21+08%3A17%3A00.000%2C90+minutes%0AApr+21+09%3A00+AM%2CRediMed+North%2C14%2C2015-04-21+08%3A00%3A00.000%2C2015-04-21+08%3A13%3A00.000%2C2015-04-21+08%3A17%3A00.000%2C2015-04-21+08%3A25%3A00.000%2C90+minutes'
    8     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !0, $8
   10     6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'str_getcsv'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !1, $10
   12    11      > FE_RESET_R                                       $12     !1, ->20
         12    > > FE_FETCH_R                                               $12, !2, ->20
   13    13    >   INIT_FCALL                                               'strtotime'
         14        FETCH_DIM_R                                      ~14     !2, 0
         15        SEND_VAL                                                 ~14
         16        DO_ICALL                                         $15     
         17        ASSIGN_DIM                                               !2, 0
         18        OP_DATA                                                  $15
   12    19      > JMP                                                      ->12
         20    >   FE_FREE                                                  $12
   16    21        ASSIGN                                                   !3, <array>
   18    22      > FE_RESET_R                                       $17     !1, ->31
         23    > > FE_FETCH_R                                       ~18     $17, !4, ->31
         24    >   ASSIGN                                                   !5, ~18
   19    25        FETCH_DIM_R                                      ~20     !4, 0
         26        FETCH_DIM_R                                      ~23     !4, 0
         27        FETCH_DIM_W                                      $21     !6, ~20
         28        ASSIGN_DIM                                               $21
         29        OP_DATA                                                  ~23
   18    30      > JMP                                                      ->23
         31    >   FE_FREE                                                  $17
   22    32      > FE_RESET_R                                       $24     !6, ->43
         33    > > FE_FETCH_R                                       ~25     $24, !4, ->43
         34    >   ASSIGN                                                   !5, ~25
   23    35        INIT_FCALL                                               'implode'
         36        SEND_VAL                                                 '%2C'
         37        SEND_VAR                                                 !4
         38        DO_ICALL                                         $27     
         39        CONCAT                                           ~28     $27, '+'
         40        CONCAT                                           ~29     ~28, !5
         41        ECHO                                                     ~29
   22    42      > JMP                                                      ->33
         43    >   FE_FREE                                                  $24
   26    44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.73 ms | 1400 KiB | 21 Q