PHP provides some specific type-testing functions. Each takes a variable as an argument and returns either TRUE of FALSE. The functions are:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN">
<head>
<title>PHP</title>
<meta Name="Author" Content="Hann So">
</head>
<body>
<p>
<?php
$test=function_exists("test_this");
if ($test == TRUE)
{
echo "Fucntion test_this exists.";
}
else
{
echo "Function test_this does not exist.";
}
?>
</p>
</body>
</html>
|