<?php 
    $user_input = "3 5 6"; 
function largest($x, $y, $z) {
  $max = $x;

  if ($x >= $y && $x >= $z)
    $max = $x;
  if ($y >= $x && $y >= $z)
    $max = $y;
  if ($z >= $x && $z >= $y)
    $max = $z;
  
  
  echo $max;
}

$arr = explode(" ", $user_input);

largest($arr[0], $arr[1], $arr[2]);