3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myDate = "2018-07-20 11:00:00"; $unix = strtotime($myDate); if(time() > ($unix + 86400*3)){ $days = -1; }else if(time() > ($unix + 86400*2)){ $days = 0; }else{ $days = "something else"; } Echo $days;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d6Q15
function name:  (null)
number of ops:  22
compiled vars:  !0 = $myDate, !1 = $unix, !2 = $days
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '2018-07-20+11%3A00%3A00'
    4     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        INIT_FCALL                                               'time'
          6        DO_ICALL                                         $6      
          7        ADD                                              ~7      !1, 259200
          8        IS_SMALLER                                               ~7, $6
          9      > JMPZ                                                     ~8, ->12
    7    10    >   ASSIGN                                                   !2, -1
    6    11      > JMP                                                      ->20
    8    12    >   INIT_FCALL                                               'time'
         13        DO_ICALL                                         $10     
         14        ADD                                              ~11     !1, 172800
         15        IS_SMALLER                                               ~11, $10
         16      > JMPZ                                                     ~12, ->19
    9    17    >   ASSIGN                                                   !2, 0
    8    18      > JMP                                                      ->20
   11    19    >   ASSIGN                                                   !2, 'something+else'
   14    20    >   ECHO                                                     !2
   15    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.28 ms | 1011 KiB | 15 Q