You can use rsort() to get the highest value in the array.

BY Best Interview Question ON 07 Apr 2020

Example

$array = array('5','2','8','4');
$result = rsort($array);


//OUTPUT : 8