3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_range_create_event = "Jan 12, 2019 08:00 PM - Feb 14, 2019 06:00 AM"; $dates = explode(" - ", $date_range_create_event); foreach($dates as &$date){ $temp = explode(" ", $date); $date = ["date" => implode(" ",array_splice($temp, 0,-2)), "time" => implode(" ", $temp)]; } unset($date); var_dump($dates);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 30
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 30
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/K4qE7
function name:  (null)
number of ops:  36
compiled vars:  !0 = $date_range_create_event, !1 = $dates, !2 = $date, !3 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Jan+12%2C+2019+08%3A00+PM+-+Feb+14%2C+2019+06%3A00+AM'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+-+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    7     6      > FE_RESET_RW                                      $7      !1, ->30
          7    > > FE_FETCH_RW                                              $7, !2, ->30
    8     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '+'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !3, $8
    9    13        INIT_FCALL                                               'implode'
         14        SEND_VAL                                                 '+'
         15        INIT_FCALL                                               'array_splice'
         16        SEND_REF                                                 !3
         17        SEND_VAL                                                 0
         18        SEND_VAL                                                 -2
         19        DO_ICALL                                         $10     
         20        SEND_VAR                                                 $10
         21        DO_ICALL                                         $11     
         22        INIT_ARRAY                                       ~12     $11, 'date'
         23        INIT_FCALL                                               'implode'
         24        SEND_VAL                                                 '+'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                         $13     
         27        ADD_ARRAY_ELEMENT                                ~12     $13, 'time'
         28        ASSIGN                                                   !2, ~12
    7    29      > JMP                                                      ->7
         30    >   FE_FREE                                                  $7
   11    31        UNSET_CV                                                 !2
   12    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.3 ms | 1014 KiB | 17 Q