I have a code that i think will detect the largest element in an array, would someone mind taking a look at it and tell me if everything checks out. I am very new to programming so forgive me in advance if the code looks rough. or is completely wrong for that matter.

<?php
echo max(2, 4, 6, 8) ;
// Returns 8

echo max (array(2, 14, 7)) ;
//Returns 14

echo max(0, 'about') ;
//Returns 0

echo max ('about', 0) ;
// Returns about

// Comparing two arrays
// so in our example: 5 = 5, but 7 < 9
$x = max(array(5, 7, 12), array(5, 9, 1)) ;
//Returns array(5, 9, 1)

// If both an array and non-array are given, the array
// is always returned as the largest
$x = max('about', array(2, 4, 6), 99) ;
//Returns array (2, 4, 6)
?>