Guest User

Untitled

a guest
Aug 20th, 2019
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_max(array $values): int {
  2.     $max = $values[0];
  3.     foreach ($values as $currentVal) {
  4.         if ($max < $currentVal) {
  5.             $max = $currentVal;
  6.         }
  7.     }
  8.     return $max;
  9. }
  10.  
  11. echo my_max([1, 2, 3]);
RAW Paste Data