3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ "February 13 2022 10:08 PM", "March 23 2022 00:20 AM", "April 3 2022 11:20 PM", "May 28 2022 12:20 AM", "June 12 2022 21:20 PM", "July 4 2022 13:20 AM", ]; $tests = preg_replace( [ '/(?:0\d|1[01]):\d{2}\K AM/', '/(?:2\d|1[3-9]):\d{2}\K [AP]M/', ], '', $tests ); var_export($tests); foreach ($tests as $test) { echo date('Y-m-d H:i:s', strtotime($test)) . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/RA2US
function name:  (null)
number of ops:  24
compiled vars:  !0 = $tests, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'preg_replace'
   16     2        SEND_VAL                                                 <array>
   19     3        SEND_VAL                                                 ''
   20     4        SEND_VAR                                                 !0
   14     5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
   22     7        INIT_FCALL                                               'var_export'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   23    10      > FE_RESET_R                                       $6      !0, ->22
         11    > > FE_FETCH_R                                               $6, !1, ->22
   24    12    >   INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         14        INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                         $8      
         19        CONCAT                                           ~9      $8, '%0A'
         20        ECHO                                                     ~9
   23    21      > JMP                                                      ->11
         22    >   FE_FREE                                                  $6
   25    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.22 ms | 1005 KiB | 17 Q