3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = array( '20.5.14', '21.5.14', '22.5.14', '23.5.14', '24.5.14', '25.5.14', '26.5.14', '27.5.14', '28.5.14', '29.5.14', '30.5.14', '31.5.14', ); foreach ($dates as $date_in) { try { $temp_date = new DateTime($date_in); $date_out = $temp_date->format('Y-m-d'); } catch (Exception $e) { $date_out = 'error'; } printf('%1$ 12s => %2$s', $date_in, $date_out); echo "\n"; }
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 = 14
Branch analysis from position: 14
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
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
filename:       /in/UkAUh
function name:  (null)
number of ops:  23
compiled vars:  !0 = $dates, !1 = $date_in, !2 = $temp_date, !3 = $date_out, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   20     1      > FE_RESET_R                                       $6      !0, ->21
          2    > > FE_FETCH_R                                               $6, !1, ->21
   22     3    >   NEW                                              $7      'DateTime'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $7
   23     7        INIT_METHOD_CALL                                         !2, 'format'
          8        SEND_VAL_EX                                              'Y-m-d'
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !3, $10
         11      > JMP                                                      ->14
   24    12  E > > CATCH                                       last         'Exception'
   25    13    >   ASSIGN                                                   !3, 'error'
   27    14    >   INIT_FCALL                                               'printf'
         15        SEND_VAL                                                 '%251%24+12s+%3D%3E+%252%24s'
         16        SEND_VAR                                                 !1
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
   28    19        ECHO                                                     '%0A'
   20    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $6
   29    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.54 ms | 1395 KiB | 15 Q