3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datesarray = array('2012-10-01', '2012-10-03', '2012-10-04', '2012-10-05', '2012-10-08', '2012-10-09'); $count = 0; $result = "Nothing found"; foreach ($datesarray as $value) { if(strtotime($datesarray[$count]) - strtotime($datesarray[$count-1]) - strtotime($datesarray[$count-2]) == -1349150400) { $result = "3 Consecutive dates found"; } $count++; } echo "Result: $result";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 26
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 26
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 24
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/M14Xf
function name:  (null)
number of ops:  31
compiled vars:  !0 = $datesarray, !1 = $count, !2 = $result, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
    5     2        ASSIGN                                                   !2, 'Nothing+found'
    7     3      > FE_RESET_R                                       $7      !0, ->26
          4    > > FE_FETCH_R                                               $7, !3, ->26
    8     5    >   INIT_FCALL                                               'strtotime'
          6        FETCH_DIM_R                                      ~8      !0, !1
          7        SEND_VAL                                                 ~8
          8        DO_ICALL                                         $9      
          9        INIT_FCALL                                               'strtotime'
         10        SUB                                              ~10     !1, 1
         11        FETCH_DIM_R                                      ~11     !0, ~10
         12        SEND_VAL                                                 ~11
         13        DO_ICALL                                         $12     
         14        SUB                                              ~13     $9, $12
         15        INIT_FCALL                                               'strtotime'
         16        SUB                                              ~14     !1, 2
         17        FETCH_DIM_R                                      ~15     !0, ~14
         18        SEND_VAL                                                 ~15
         19        DO_ICALL                                         $16     
         20        SUB                                              ~17     ~13, $16
         21        IS_EQUAL                                                 ~17, -1349150400
         22      > JMPZ                                                     ~18, ->24
    9    23    >   ASSIGN                                                   !2, '3+Consecutive+dates+found'
   11    24    >   PRE_INC                                                  !1
    7    25      > JMP                                                      ->4
         26    >   FE_FREE                                                  $7
   14    27        NOP                                                      
         28        FAST_CONCAT                                      ~21     'Result%3A+', !2
         29        ECHO                                                     ~21
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.32 ms | 1396 KiB | 15 Q