3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currMonth = date('Y-m') ; $ts = time() ; $nextWed = false ; do { $currentWed = $nextWed ; $nextWedTS = strtotime('next wednesday', $ts) ; $ts = $nextWedTS ; $nextWed = date('Y-m-d', $nextWedTS) ; $nextWedMonth = date('Y-m', $nextWedTS) ; } while ($nextWedMonth == $currMonth) ; echo $currentWed;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 8
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/gBvm9
function name:  (null)
number of ops:  29
compiled vars:  !0 = $currMonth, !1 = $ts, !2 = $nextWed, !3 = $currentWed, !4 = $nextWedTS, !5 = $nextWedMonth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Y-m'
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    5     4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !1, $8
    6     7        ASSIGN                                                   !2, <false>
    8     8    >   ASSIGN                                                   !3, !2
    9     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 'next+wednesday'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $12     
         13        ASSIGN                                                   !4, $12
   10    14        ASSIGN                                                   !1, !4
   11    15        INIT_FCALL                                               'date'
         16        SEND_VAL                                                 'Y-m-d'
         17        SEND_VAR                                                 !4
         18        DO_ICALL                                         $15     
         19        ASSIGN                                                   !2, $15
   12    20        INIT_FCALL                                               'date'
         21        SEND_VAL                                                 'Y-m'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !5, $17
   13    25        IS_EQUAL                                                 !5, !0
         26      > JMPNZ                                                    ~19, ->8
   15    27    >   ECHO                                                     !3
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.92 ms | 1395 KiB | 19 Q