3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checkday = "Sunday"; $period = "2 Days"; $dtStart = date_create('Tomorrow')->modify('last '.$checkday); $dtEnd = (clone $dtStart)->modify($period); $dtToDay = date_create('today'); if($dtToDay >= $dtStart AND $dtToDay < $dtEnd){ echo 'run function'; } else { echo 'do nothing'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/5d2Xt
function name:  (null)
number of ops:  28
compiled vars:  !0 = $checkday, !1 = $period, !2 = $dtStart, !3 = $dtEnd, !4 = $dtToDay
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Sunday'
    3     1        ASSIGN                                                   !1, '2+Days'
    5     2        INIT_FCALL                                               'date_create'
          3        SEND_VAL                                                 'Tomorrow'
          4        DO_ICALL                                         $7      
          5        INIT_METHOD_CALL                                         $7, 'modify'
          6        CONCAT                                           ~8      'last+', !0
          7        SEND_VAL_EX                                              ~8
          8        DO_FCALL                                      0  $9      
          9        ASSIGN                                                   !2, $9
    6    10        CLONE                                            ~11     !2
         11        INIT_METHOD_CALL                                         ~11, 'modify'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $12     
         14        ASSIGN                                                   !3, $12
    7    15        INIT_FCALL                                               'date_create'
         16        SEND_VAL                                                 'today'
         17        DO_ICALL                                         $14     
         18        ASSIGN                                                   !4, $14
    8    19        IS_SMALLER_OR_EQUAL                              ~16     !2, !4
         20      > JMPZ_EX                                          ~16     ~16, ->23
         21    >   IS_SMALLER                                       ~17     !4, !3
         22        BOOL                                             ~16     ~17
         23    > > JMPZ                                                     ~16, ->26
    9    24    >   ECHO                                                     'run+function'
    8    25      > JMP                                                      ->27
   12    26    >   ECHO                                                     'do+nothing'
   13    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.44 ms | 998 KiB | 14 Q