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, ", $ref); echo strftime("this week = %a $F, ", strtotime("this week", $ref)); echo strftime("next week = %a $F\n", strtotime("next week", $ref)); }
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 = 47
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 47
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 47
Branch analysis from position: 9
Branch analysis from position: 47
filename:       /in/nXoDJ
function name:  (null)
number of ops:  49
compiled vars:  !0 = $F, !1 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strftime'
          1        SEND_VAL                                                 '%25F'
          2        DO_FCALL_BY_NAME                                         
          3      > JMPZ                                                     $2, ->6
          4    >   QM_ASSIGN                                        ~3      '%25F'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~3      '%25Y-%25m-%25d'
          7    >   ASSIGN                                                   !0, ~3
    5     8      > FE_RESET_R                                       $5      <array>, ->47
          9    > > FE_FETCH_R                                               $5, !1, ->47
    6    10    >   INIT_FCALL                                               'strtotime'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
    7    14        INIT_FCALL                                               'strftime'
         15        ROPE_INIT                                     3  ~9      'Relative+to+%25a+'
         16        ROPE_ADD                                      1  ~9      ~9, !0
         17        ROPE_END                                      2  ~8      ~9, '%2C+'
         18        SEND_VAL                                                 ~8
         19        SEND_VAR                                                 !1
         20        DO_FCALL_BY_NAME                                         
         21        ECHO                                                     $11
    8    22        INIT_FCALL                                               'strftime'
         23        ROPE_INIT                                     3  ~13     'this+week+%3D+%25a+'
         24        ROPE_ADD                                      1  ~13     ~13, !0
         25        ROPE_END                                      2  ~12     ~13, '%2C+'
         26        SEND_VAL                                                 ~12
         27        INIT_FCALL                                               'strtotime'
         28        SEND_VAL                                                 'this+week'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $15     
         31        SEND_VAR                                                 $15
         32        DO_FCALL_BY_NAME                                         
         33        ECHO                                                     $16
    9    34        INIT_FCALL                                               'strftime'
         35        ROPE_INIT                                     3  ~18     'next+week+%3D+%25a+'
         36        ROPE_ADD                                      1  ~18     ~18, !0
         37        ROPE_END                                      2  ~17     ~18, '%0A'
         38        SEND_VAL                                                 ~17
         39        INIT_FCALL                                               'strtotime'
         40        SEND_VAL                                                 'next+week'
         41        SEND_VAR                                                 !1
         42        DO_ICALL                                         $20     
         43        SEND_VAR                                                 $20
         44        DO_FCALL_BY_NAME                                         
         45        ECHO                                                     $21
    5    46      > JMP                                                      ->9
         47    >   FE_FREE                                                  $5
   10    48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.38 ms | 1004 KiB | 15 Q