3v4l.org

run code in 300+ PHP versions simultaneously
<?php $F = strftime("%F") ? "%F" : "%Y-%m-%d"; foreach (array("Sat 2016-07-30", "Sun 2016-07-31", "Mon 2016-08-01", "Tue 2016-08-02") as $ref) { $ref = strtotime($ref); echo strftime("Relative to %a $F\n", $ref); foreach (array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun") as $day) { echo strftime("{$day} next week = %a $F\n", strtotime("{$day} next week", $ref)); } echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 43
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 43
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 40
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 40
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 40
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 43
Branch analysis from position: 9
Branch analysis from position: 43
filename:       /in/qv8vI
function name:  (null)
number of ops:  45
compiled vars:  !0 = $F, !1 = $ref, !2 = $day
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strftime'
          1        SEND_VAL                                                 '%25F'
          2        DO_ICALL                                         $3      
          3      > JMPZ                                                     $3, ->6
          4    >   QM_ASSIGN                                        ~4      '%25F'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~4      '%25Y-%25m-%25d'
          7    >   ASSIGN                                                   !0, ~4
    5     8      > FE_RESET_R                                       $6      <array>, ->43
          9    > > FE_FETCH_R                                               $6, !1, ->43
    6    10    >   INIT_FCALL                                               'strtotime'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
    7    14        INIT_FCALL                                               'strftime'
         15        ROPE_INIT                                     3  ~10     'Relative+to+%25a+'
         16        ROPE_ADD                                      1  ~10     ~10, !0
         17        ROPE_END                                      2  ~9      ~10, '%0A'
         18        SEND_VAL                                                 ~9
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $12     
         21        ECHO                                                     $12
    9    22      > FE_RESET_R                                       $13     <array>, ->40
         23    > > FE_FETCH_R                                               $13, !2, ->40
   10    24    >   INIT_FCALL                                               'strftime'
         25        ROPE_INIT                                     4  ~15     !2
         26        ROPE_ADD                                      1  ~15     ~15, '+next+week+%3D+%25a+'
         27        ROPE_ADD                                      2  ~15     ~15, !0
         28        ROPE_END                                      3  ~14     ~15, '%0A'
         29        SEND_VAL                                                 ~14
         30        INIT_FCALL                                               'strtotime'
         31        NOP                                                      
         32        FAST_CONCAT                                      ~17     !2, '+next+week'
         33        SEND_VAL                                                 ~17
         34        SEND_VAR                                                 !1
         35        DO_ICALL                                         $18     
         36        SEND_VAR                                                 $18
         37        DO_ICALL                                         $19     
         38        ECHO                                                     $19
    9    39      > JMP                                                      ->23
         40    >   FE_FREE                                                  $13
   13    41        ECHO                                                     '%0A'
    5    42      > JMP                                                      ->9
         43    >   FE_FREE                                                  $6
   14    44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.87 ms | 1400 KiB | 17 Q