3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($h = 1; $h < 48; $h++) { $dt = new DateTime(sprintf("2018-03-25 %02u:%02u:00", $h / 2, ($h % 2) * 30)); echo $dt->format("Y-m-d H:i:s -> "); $dt->setTime(0, 0, 0); echo $dt->format("Y-m-d H:i:s\n"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 2
Branch analysis from position: 30
Branch analysis from position: 2
filename:       /in/1gsAT
function name:  (null)
number of ops:  31
compiled vars:  !0 = $h, !1 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->28
    4     2    >   NEW                                              $3      'DateTime'
          3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 '2018-03-25+%2502u%3A%2502u%3A00'
          5        DIV                                              ~4      !0, 2
          6        SEND_VAL                                                 ~4
          7        MOD                                              ~5      !0, 2
          8        MUL                                              ~6      ~5, 30
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11        SEND_VAR_NO_REF_EX                                       $7
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $3
    5    14        INIT_METHOD_CALL                                         !1, 'format'
         15        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As+-%3E+'
         16        DO_FCALL                                      0  $10     
         17        ECHO                                                     $10
    6    18        INIT_METHOD_CALL                                         !1, 'setTime'
         19        SEND_VAL_EX                                              0
         20        SEND_VAL_EX                                              0
         21        SEND_VAL_EX                                              0
         22        DO_FCALL                                      0          
    7    23        INIT_METHOD_CALL                                         !1, 'format'
         24        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As%0A'
         25        DO_FCALL                                      0  $12     
         26        ECHO                                                     $12
    3    27        PRE_INC                                                  !0
         28    >   IS_SMALLER                                               !0, 48
         29      > JMPNZ                                                    ~14, ->2
    8    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.21 ms | 1401 KiB | 15 Q