3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = "30-12-1899 9:25:52 AM"; sscanf($date, "%d-%d-%d %d:%d:%d %s", $d, $m, $Y, $g, $i, $s, $A); $h = $A == 'AM' ? $g : $g + 12; $date = "$Y-$m-$d $h:$i:$s"; $date = strtotime($date); echo date('H:i:s', $date);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KXYr7
function name:  (null)
number of ops:  41
compiled vars:  !0 = $date, !1 = $d, !2 = $m, !3 = $Y, !4 = $g, !5 = $i, !6 = $s, !7 = $A, !8 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '30-12-1899+9%3A25%3A52+AM'
    3     1        INIT_FCALL                                               'sscanf'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%25d-%25d-%25d+%25d%3A%25d%3A%25d+%25s'
          4        SEND_REF                                                 !1
          5        SEND_REF                                                 !2
          6        SEND_REF                                                 !3
          7        SEND_REF                                                 !4
          8        SEND_REF                                                 !5
          9        SEND_REF                                                 !6
         10        SEND_REF                                                 !7
         11        DO_ICALL                                                 
    4    12        IS_EQUAL                                                 !7, 'AM'
         13      > JMPZ                                                     ~11, ->16
         14    >   QM_ASSIGN                                        ~12     !4
         15      > JMP                                                      ->18
         16    >   ADD                                              ~13     !4, 12
         17        QM_ASSIGN                                        ~12     ~13
         18    >   ASSIGN                                                   !8, ~12
    5    19        ROPE_INIT                                    11  ~16     !3
         20        ROPE_ADD                                      1  ~16     ~16, '-'
         21        ROPE_ADD                                      2  ~16     ~16, !2
         22        ROPE_ADD                                      3  ~16     ~16, '-'
         23        ROPE_ADD                                      4  ~16     ~16, !1
         24        ROPE_ADD                                      5  ~16     ~16, '+'
         25        ROPE_ADD                                      6  ~16     ~16, !8
         26        ROPE_ADD                                      7  ~16     ~16, '%3A'
         27        ROPE_ADD                                      8  ~16     ~16, !5
         28        ROPE_ADD                                      9  ~16     ~16, '%3A'
         29        ROPE_END                                     10  ~15     ~16, !6
         30        ASSIGN                                                   !0, ~15
    6    31        INIT_FCALL                                               'strtotime'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $23     
         34        ASSIGN                                                   !0, $23
    7    35        INIT_FCALL                                               'date'
         36        SEND_VAL                                                 'H%3Ai%3As'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $25     
         39        ECHO                                                     $25
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.22 ms | 945 KiB | 20 Q