Testing the Type of a Variable : Variable Type : Language Basics PHP Source Code


PHP Source Code » Language Basics » Variable Type »

 

Testing the Type of a Variable




<html>
<head>
<title>Testing the type of a variable</title>
</head>
<body>
<?php
$testing = 5;
print gettype$testing )// integer
print "<br>";

$testing = "five";
print gettype$testing )// string
print("<br>");

$testing = 5.0;
print gettype$testing )// double
print("<br>");

$testing = true;
print gettype$testing )// boolean
print "<br>";
?>
</body>
</html>


           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» Variable Type