3v4l.org

run code in 300+ PHP versions simultaneously
<?php function t($time) { try { $d = DateTime::createFromFormat('d.m.Y, H:i', $time); echo ($d) ? $d->format("Y-m-d H:i:s O") : "fail", "\n"; } catch (Exception $e) { echo "E! ", $e->getMessage(), "\n"; } } t('11.06.2015, 16:45'); t('31.06.2015, 16:45'); t('wtf??!!!111111');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WfZia
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               't'
          1        SEND_VAL                                                 '11.06.2015%2C+16%3A45'
          2        DO_FCALL                                      0          
   14     3        INIT_FCALL                                               't'
          4        SEND_VAL                                                 '31.06.2015%2C+16%3A45'
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               't'
          7        SEND_VAL                                                 'wtf%3F%3F%21%21%21111111'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function t:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Found catch point at position: 16
Branch analysis from position: 16
2 jumps found. (Code = 107) Position 1 = 17, Position 2 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WfZia
function name:  t
number of ops:  23
compiled vars:  !0 = $time, !1 = $d, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          2        SEND_VAL                                                 'd.m.Y%2C+H%3Ai'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
    5     6      > JMPZ                                                     !1, ->12
          7    >   INIT_METHOD_CALL                                         !1, 'format'
          8        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+O'
          9        DO_FCALL                                      0  $5      
         10        QM_ASSIGN                                        ~6      $5
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~6      'fail'
         13    >   ECHO                                                     ~6
         14        ECHO                                                     '%0A'
         15      > JMP                                                      ->22
    7    16  E > > CATCH                                       last         'Exception'
    8    17    >   ECHO                                                     'E%21+'
         18        INIT_METHOD_CALL                                         !2, 'getMessage'
         19        DO_FCALL                                      0  $7      
         20        ECHO                                                     $7
         21        ECHO                                                     '%0A'
   11    22    > > RETURN                                                   null

End of function t

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.93 ms | 1394 KiB | 16 Q