3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = strtotime('2014-06-05'); $next_monday = strtotime('2014-06-09'); if (($next_monday-$now) < (5*86400)){ $next_monday = $next_monday + 604800;//add a week $third_friday = $next_monday+1555200; //add 18 days to get the 3rd friday $start_date = date('Y-m-d', $third_friday) . "T00:00:00"; }else{ $third_friday = $next_monday+1555200;//add 18 days to get the 3rd friday $start_date = date('Y-m-d', $third_friday) . "T00:00:00"; } echo $start_date; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FihGV
function name:  (null)
number of ops:  32
compiled vars:  !0 = $now, !1 = $next_monday, !2 = $third_friday, !3 = $start_date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2014-06-05'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2014-06-09'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    4     8        SUB                                              ~8      !1, !0
          9        IS_SMALLER                                               ~8, 432000
         10      > JMPZ                                                     ~9, ->22
    5    11    >   ADD                                              ~10     !1, 604800
         12        ASSIGN                                                   !1, ~10
    6    13        ADD                                              ~12     !1, 1555200
         14        ASSIGN                                                   !2, ~12
    7    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'Y-m-d'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $14     
         19        CONCAT                                           ~15     $14, 'T00%3A00%3A00'
         20        ASSIGN                                                   !3, ~15
         21      > JMP                                                      ->30
    9    22    >   ADD                                              ~17     !1, 1555200
         23        ASSIGN                                                   !2, ~17
   10    24        INIT_FCALL                                               'date'
         25        SEND_VAL                                                 'Y-m-d'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $19     
         28        CONCAT                                           ~20     $19, 'T00%3A00%3A00'
         29        ASSIGN                                                   !3, ~20
   12    30    >   ECHO                                                     !3
   14    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.32 ms | 1396 KiB | 17 Q