3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting( -1 ); date_default_timezone_set( "Europe/Bratislava" ); for ( $i = 0; $i < 7; $i++ ) { $base = strtotime( "2017-01-08 +$i days 12:00:00" ); $weekday = 'Friday'; $relative = strtotime( "$weekday this week 12:00:00", $base ); echo "Base: ".date( "l Y/m/d", $base ), "\n", "Relative: ".date( "l Y/m/d", $relative ), "\n\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 8
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 8
Branch analysis from position: 40
Branch analysis from position: 8
filename:       /in/WMUKR
function name:  (null)
number of ops:  41
compiled vars:  !0 = $i, !1 = $base, !2 = $weekday, !3 = $relative
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'date_default_timezone_set'
          4        SEND_VAL                                                 'Europe%2FBratislava'
          5        DO_ICALL                                                 
    6     6        ASSIGN                                                   !0, 0
          7      > JMP                                                      ->38
    9     8    >   INIT_FCALL                                               'strtotime'
          9        ROPE_INIT                                     3  ~8      '2017-01-08+%2B'
         10        ROPE_ADD                                      1  ~8      ~8, !0
         11        ROPE_END                                      2  ~7      ~8, '+days+12%3A00%3A00'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !1, $10
   10    15        ASSIGN                                                   !2, 'Friday'
   11    16        INIT_FCALL                                               'strtotime'
         17        NOP                                                      
         18        FAST_CONCAT                                      ~13     !2, '+this+week+12%3A00%3A00'
         19        SEND_VAL                                                 ~13
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !3, $14
   13    23        INIT_FCALL                                               'date'
         24        SEND_VAL                                                 'l+Y%2Fm%2Fd'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $16     
         27        CONCAT                                           ~17     'Base%3A+', $16
         28        ECHO                                                     ~17
         29        ECHO                                                     '%0A'
         30        INIT_FCALL                                               'date'
         31        SEND_VAL                                                 'l+Y%2Fm%2Fd'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                         $18     
         34        CONCAT                                           ~19     'Relative%3A+', $18
         35        ECHO                                                     ~19
         36        ECHO                                                     '%0A%0A'
    6    37        PRE_INC                                                  !0
         38    >   IS_SMALLER                                               !0, 7
         39      > JMPNZ                                                    ~21, ->8
   14    40    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.08 ms | 1400 KiB | 21 Q