3v4l.org

run code in 300+ PHP versions simultaneously
<?php $day_now = date("l"); if($day_now != "Monday"){ $date_beg = date("Y-m-d",strtotime("last Monday")); }else{ $date_beg = date("Y-m-d"); } $ts = $date_beg; $unJour = 3600 * 24; // nombre de secondes dans une journée $ts += 4*$unJour; // 4 jours de plus $date_end = date("Y-m-d",$ts); echo $date_end;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oB9FW
function name:  (null)
number of ops:  30
compiled vars:  !0 = $day_now, !1 = $date_beg, !2 = $ts, !3 = $unJour, !4 = $date_end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'l'
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    3     4        IS_NOT_EQUAL                                             !0, 'Monday'
          5      > JMPZ                                                     ~7, ->15
    4     6    >   INIT_FCALL                                               'date'
          7        SEND_VAL                                                 'Y-m-d'
          8        INIT_FCALL                                               'strtotime'
          9        SEND_VAL                                                 'last+Monday'
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !1, $9
         14      > JMP                                                      ->19
    6    15    >   INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'Y-m-d'
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !1, $11
    8    19    >   ASSIGN                                                   !2, !1
    9    20        ASSIGN                                                   !3, 86400
   10    21        MUL                                              ~15     !3, 4
         22        ASSIGN_OP                                     1          !2, ~15
   11    23        INIT_FCALL                                               'date'
         24        SEND_VAL                                                 'Y-m-d'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $17     
         27        ASSIGN                                                   !4, $17
   12    28        ECHO                                                     !4
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.44 ms | 1396 KiB | 17 Q