3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $yearRange = array(); $years1 = range(date('Y') + 1, (date('Y') - 2)); foreach ($years1 as $value) { $yearRange[$value] = $value; } print_r($yearRange);
based on gegoD
Output for 4.3.0 - 7.2.0
Array ( [2016] => 2016 [2015] => 2015 [2014] => 2014 [2013] => 2013 )