$array= array(1,2,3,4,5);
$reversedArray = array_reverse($array);
var_dump($y);
array_reverse($array);
<?php
$i_arr = ["html", "css", "javascript", "php", "vue", "react"];
echo "<pre>";
print_r($i_arr);
echo "</pre>";
$reverse = array_reverse($i_arr, false);
$preserve = array_reverse($i_arr, true);
echo "<pre>";
print_r($reverse);
echo "</pre>";
echo "<pre>";
print_r($preserve);
echo "</pre>";
?>
$array= array(1,2,3,4,5);
$reversedArray = array_reverse($array);
// [5,4,3,2,1]