Professional Documents
Culture Documents
Computer Science
*************************************************************************************
Assignment no: 7 Assignment Name: Write a PHP script to check whether given Variable stores an
integer, float, Boolean, null, array, String.
************************************************************************************
<?php
$string = “Yahoo”;
$int = 2500;
//$string = “2500.50”;
//$string = ‘2500.50’;
$float = 2500.50;
$bool = true;
$bool1 = false;
$null = null;
$array = array(“html”,”css”,”js”,”php”,”java”);
Echo $string.”<br>”;
Var_dump($string);
Echo $int.”<br>”;
Var_dump($int);
Echo $float.”<br>”;
Var_dump($float);
Echo $bool.”<br>”;
Var_dump($bool);
Echo $bool1.”<br>”;
Var_dump($bool1);
Echo $null.”<br>”;
Var_dump($null);
Echo “<br>”;
Echo $array[1].”<br>”;
Var_dump($array);
?>