3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($offset = 0; ; $offset -= 60 * 60 * 24){ $time = strtotime("now") + $offset; $now = date('D',$time); echo $now . "\n"; if( strtolower($now) == 'mon' ){ break; } } echo date("m-d-Y",$time) . "\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 2
Branch analysis from position: 22
Branch analysis from position: 2
filename:       /in/VmrNH
function name:  (null)
number of ops:  29
compiled vars:  !0 = $offset, !1 = $time, !2 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->21
    4     2    >   INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 'now'
          4        DO_ICALL                                         $4      
          5        ADD                                              ~5      $4, !0
          6        ASSIGN                                                   !1, ~5
    5     7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'D'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    6    12        CONCAT                                           ~9      !2, '%0A'
         13        ECHO                                                     ~9
    7    14        INIT_FCALL                                               'strtolower'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        IS_EQUAL                                                 $10, 'mon'
         18      > JMPZ                                                     ~11, ->20
    8    19    > > JMP                                                      ->22
    3    20    >   ASSIGN_OP                                     2          !0, 86400
         21    > > JMPNZ                                                    <true>, ->2
   11    22    >   INIT_FCALL                                               'date'
         23        SEND_VAL                                                 'm-d-Y'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $13     
         26        CONCAT                                           ~14     $13, '%0A'
         27        ECHO                                                     ~14
   12    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.96 ms | 1388 KiB | 19 Q