3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $yearOption = date('Y') + 1; $numYears = 3; for($i = 0; $i < $numYears; $i++, $yearOption--){ echo "<option value='$yearOption'>$yearOption</option>"; }
Output for 4.3.0 - 7.1.0
<option value='2014'>2014</option><option value='2013'>2013</option><option value='2012'>2012</option>