3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time ='2013-03-30 01:15:00'; $stamp = strtotime($time); for($i=0; $i<4; $i++){ echo date('Y-m-d H:i:s', strtotime("+{$i} hours", $stamp)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
Branch analysis from position: 7
filename:       /in/4pMlt
function name:  (null)
number of ops:  23
compiled vars:  !0 = $time, !1 = $stamp, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2013-03-30+01%3A15%3A00'
    3     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    4     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->20
    5     7    >   INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          9        INIT_FCALL                                               'strtotime'
         10        ROPE_INIT                                     3  ~8      '%2B'
         11        ROPE_ADD                                      1  ~8      ~8, !2
         12        ROPE_END                                      2  ~7      ~8, '+hours'
         13        SEND_VAL                                                 ~7
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $10     
         16        SEND_VAR                                                 $10
         17        DO_ICALL                                         $11     
         18        ECHO                                                     $11
    4    19        PRE_INC                                                  !2
         20    >   IS_SMALLER                                               !2, 4
         21      > JMPNZ                                                    ~13, ->7
    6    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.23 ms | 1395 KiB | 17 Q