$string = substr($string,0,255); //max 255 chars
echo max(2, 3, 1, 6, 7); // 7 echo max(array(2, 4, 5)); // 5