Digunakan untuk menghasilkan waktu dengan keluaran bertipe array.Sintaksnya adalah :
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<body>
<font face=verdana size=2>
<?
echo “<hr>”;
echo “sekarang jam:”,date(‘h:i:s A’);
echo “<hr>”;
$jam=getdate();
echo “selamat <b><u>”;
if($jam[hours]<=9)
echo “pagi”;
else
if($jam[hours]<=14)
echo “siang”;
else
if($jam[hours]<=19)
echo “sore”;
else
echo “malam”;
echo “</b></u> Mr.Ucup”;
?>
</font>
</body>
</html>