3v4l.org

run code in 300+ PHP versions simultaneously
<?php $act = new DateTime('2016-04-01 23:00:00'); $prev = null; $finish = new DateTime('2016-03-27 01:00:00'); while ($act > $finish) { $prev = clone $act; $act->sub(new DateInterval('PT1H')); $passed = assert($prev != $act); if (!$passed) { break; } } var_dump( $act );
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 = 10
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 28
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 28
filename:       /in/TWdmp
function name:  (null)
number of ops:  34
compiled vars:  !0 = $act, !1 = $prev, !2 = $finish, !3 = $passed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'DateTime'
          1        SEND_VAL_EX                                              '2016-04-01+23%3A00%3A00'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        ASSIGN                                                   !1, null
    5     5        NEW                                              $8      'DateTime'
          6        SEND_VAL_EX                                              '2016-03-27+01%3A00%3A00'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $8
    7     9      > JMP                                                      ->28
    8    10    >   CLONE                                            ~11     !0
         11        ASSIGN                                                   !1, ~11
    9    12        INIT_METHOD_CALL                                         !0, 'sub'
         13        NEW                                              $13     'DateInterval'
         14        SEND_VAL_EX                                              'PT1H'
         15        DO_FCALL                                      0          
         16        SEND_VAR_NO_REF_EX                                       $13
         17        DO_FCALL                                      0          
   11    18        ASSERT_CHECK                                     $17     
         19        INIT_FCALL                                               'assert'
         20        IS_NOT_EQUAL                                     ~16     !1, !0
         21        SEND_VAL                                                 ~16
         22        SEND_VAL                                                 'assert%28%24prev+%21%3D+%24act%29'
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !3, $17
   13    25        BOOL_NOT                                         ~19     !3
         26      > JMPZ                                                     ~19, ->28
   14    27    > > JMP                                                      ->30
    7    28    >   IS_SMALLER                                               !2, !0
         29      > JMPNZ                                                    ~20, ->10
   18    30    >   INIT_FCALL                                               'var_dump'
   19    31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
   20    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.95 ms | 1396 KiB | 17 Q