3v4l.org

run code in 300+ PHP versions simultaneously
<?php $invalidDates = ['31-02-2015', '31-02-2015 26:99:99']; foreach ($invalidDates as $invalidDate) { $parsedDate = date($invalidDate); $parseDateTime = new DateTime($invalidDate); echo $invalidDate . ' ' . $parsedDate . ' ' . $parseDateTime->format('Y-m-d H:i:s') . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/JNiI5
function name:  (null)
number of ops:  23
compiled vars:  !0 = $invalidDates, !1 = $invalidDate, !2 = $parsedDate, !3 = $parseDateTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $5      !0, ->21
          2    > > FE_FETCH_R                                               $5, !1, ->21
    5     3    >   INIT_FCALL                                               'date'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    6     7        NEW                                              $8      'DateTime'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !3, $8
    8    11        CONCAT                                           ~11     !1, '+'
         12        CONCAT                                           ~12     ~11, !2
         13        CONCAT                                           ~13     ~12, '+'
         14        INIT_METHOD_CALL                                         !3, 'format'
         15        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
         16        DO_FCALL                                      0  $14     
         17        CONCAT                                           ~15     ~13, $14
         18        CONCAT                                           ~16     ~15, '%0A'
         19        ECHO                                                     ~16
    4    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $5
    9    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.01 ms | 1395 KiB | 15 Q