3v4l.org

run code in 500+ 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 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/RA2US
function name:  (null)
number of ops:  21
compiled vars:  !0 = $tests, !1 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                       !0, <array>
   14     1        FRAMELESS_ICALL_3                preg_replace        ~3      <array>, ''
   20     2        OP_DATA                                                      !0
   14     3        ASSIGN                                                       !0, ~3
   22     4        INIT_FCALL                                                   'var_export'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                                     
   23     7      > FE_RESET_R                                           $6      !0, ->19
          8    > > FE_FETCH_R                                                   $6, !1, ->19
   24     9    >   INIT_FCALL                                                   'date'
         10        SEND_VAL                                                     'Y-m-d+H%3Ai%3As'
         11        INIT_FCALL                                                   'strtotime'
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                             $7      
         14        SEND_VAR                                                     $7
         15        DO_ICALL                                             $8      
         16        CONCAT                                               ~9      $8, '%0A'
         17        ECHO                                                         ~9
   23    18      > JMP                                                          ->8
         19    >   FE_FREE                                                      $6
   25    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.61 ms | 1762 KiB | 16 Q