3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mission_type = 0; $start_dttm = ($mission_type == 0) ? strtotime("last Monday") : strtotime("last Friday"); // 리그 시작 일자 $end_dttm = ($mission_type == 0) ? strtotime("next Tuesday") : strtotime("next Thursday"); // 리그 종료 일자 // echo strtotime("last Monday"); // echo time(); // echo date('ymd', strtotime("this Tuesday")); // echo '<br>'; // echo date('ymd', strtotime("next Tuesday")); // echo '<br>'; // echo date('ymd', $start_dttm); // echo strtotime("this Tuesday"); // echo strtotime("next Tuesday"); $nextTuesday = strtotime('next wednesday'); $weekNo = date('W'); $weekNoNextTuesday = date('W', $nextTuesday); if ($weekNoNextTuesday != $weekNo) { //past tuesday echo 0; } else { echo 1; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 42
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 42
Branch analysis from position: 40
Branch analysis from position: 42
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
Branch analysis from position: 20
filename:       /in/IMIc7
function name:  (null)
number of ops:  44
compiled vars:  !0 = $mission_type, !1 = $start_dttm, !2 = $end_dttm, !3 = $nextTuesday, !4 = $weekNo, !5 = $weekNoNextTuesday
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    5     1        IS_EQUAL                                                 !0, 0
          2      > JMPZ                                                     ~7, ->8
          3    >   INIT_FCALL                                               'strtotime'
          4        SEND_VAL                                                 'last+Monday'
          5        DO_ICALL                                         $8      
          6        QM_ASSIGN                                        ~9      $8
          7      > JMP                                                      ->12
          8    >   INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 'last+Friday'
         10        DO_ICALL                                         $10     
         11        QM_ASSIGN                                        ~9      $10
         12    >   ASSIGN                                                   !1, ~9
    6    13        IS_EQUAL                                                 !0, 0
         14      > JMPZ                                                     ~12, ->20
         15    >   INIT_FCALL                                               'strtotime'
         16        SEND_VAL                                                 'next+Tuesday'
         17        DO_ICALL                                         $13     
         18        QM_ASSIGN                                        ~14     $13
         19      > JMP                                                      ->24
         20    >   INIT_FCALL                                               'strtotime'
         21        SEND_VAL                                                 'next+Thursday'
         22        DO_ICALL                                         $15     
         23        QM_ASSIGN                                        ~14     $15
         24    >   ASSIGN                                                   !2, ~14
   22    25        INIT_FCALL                                               'strtotime'
         26        SEND_VAL                                                 'next+wednesday'
         27        DO_ICALL                                         $17     
         28        ASSIGN                                                   !3, $17
   23    29        INIT_FCALL                                               'date'
         30        SEND_VAL                                                 'W'
         31        DO_ICALL                                         $19     
         32        ASSIGN                                                   !4, $19
   24    33        INIT_FCALL                                               'date'
         34        SEND_VAL                                                 'W'
         35        SEND_VAR                                                 !3
         36        DO_ICALL                                         $21     
         37        ASSIGN                                                   !5, $21
   26    38        IS_NOT_EQUAL                                             !5, !4
         39      > JMPZ                                                     ~23, ->42
   28    40    >   ECHO                                                     0
         41      > JMP                                                      ->43
   30    42    >   ECHO                                                     1
   31    43    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.07 ms | 1400 KiB | 17 Q