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', ); echo "<pre>"; 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"; } echo "</pre>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Found catch point at position: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
filename:       /in/Uf4Me
function name:  (null)
number of ops:  25
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>
   19     1        ECHO                                                     '%3Cpre%3E'
   20     2      > FE_RESET_R                                       $6      !0, ->22
          3    > > FE_FETCH_R                                               $6, !1, ->22
   22     4    >   NEW                                              $7      'DateTime'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $7
   23     8        INIT_METHOD_CALL                                         !2, 'format'
          9        SEND_VAL_EX                                              'Y-m-d'
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !3, $10
         12      > JMP                                                      ->15
   24    13  E > > CATCH                                       last         'Exception'
   25    14    >   ASSIGN                                                   !3, 'error'
   27    15    >   INIT_FCALL                                               'printf'
         16        SEND_VAL                                                 '%251%24+12s+%3D%3E+%252%24s'
         17        SEND_VAR                                                 !1
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
   28    20        ECHO                                                     '%0A'
   20    21      > JMP                                                      ->3
         22    >   FE_FREE                                                  $6
   30    23        ECHO                                                     '%3C%2Fpre%3E'
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
282.79 ms | 1396 KiB | 16 Q