array reverce php

PHP
$array= array(1,2,3,4,5);
$reversedArray = array_reverse($array);

var_dump($y);
Source

Also in PHP: