3v4l.org

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