3v4l.org

run code in 500+ PHP versions simultaneously
<?php $statuses = [ "OK, 26.10.2022 13:24:00, Delivered Zak", "28.10.2022 11:20:00, Delivered", "christmas eve 24 Dec 2020 19:00", "ABC 2022-09-12 13:45, and so on", ]; foreach ($statuses as $status) { $date = date_create(trim($status,"A..Za..z, ")); echo $date->format("Y-m-d H:i:s")."<br>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/uqAmm
function name:  (null)
number of ops:  16
compiled vars:  !0 = $statuses, !1 = $status, !2 = $date
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1      > FE_RESET_R                                           $4      !0, ->14
          2    > > FE_FETCH_R                                                   $4, !1, ->14
   10     3    >   INIT_FCALL                                                   'date_create'
          4        FRAMELESS_ICALL_2                trim                ~5      !1, 'A..Za..z%2C+'
          5        SEND_VAL                                                     ~5
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !2, $6
   11     8        INIT_METHOD_CALL                                             !2, 'format'
          9        SEND_VAL_EX                                                  'Y-m-d+H%3Ai%3As'
         10        DO_FCALL                                          0  $8      
         11        CONCAT                                               ~9      $8, '%3Cbr%3E%0A'
         12        ECHO                                                         ~9
    9    13      > JMP                                                          ->2
         14    >   FE_FREE                                                      $4
   12    15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
154.55 ms | 1895 KiB | 14 Q