3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $years = array( 1=>2000, 2=>2001, 3=>2002, 4=>2003, 5=>2004, 6=>2005, 7=>2006, 8=>2007, 9=>2008, 10=>2009, 11=>2010, 12=>2011, 13=>2012, 14=>2013, ); var_dump($years); var_dump(rsort($years)); var_dump(krsort($years)); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(14) { [1]=> int(2000) [2]=> int(2001) [3]=> int(2002) [4]=> int(2003) [5]=> int(2004) [6]=> int(2005) [7]=> int(2006) [8]=> int(2007) [9]=> int(2008) [10]=> int(2009) [11]=> int(2010) [12]=> int(2011) [13]=> int(2012) [14]=> int(2013) } bool(true) bool(true)