Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

PHP Data type program, Exercises of Computer Science

PHP Data type program exercise covering data types in PHP

Typology: Exercises

2016/2017

Uploaded on 07/05/2017

rahulppune
rahulppune 🇮🇳

1 document

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
<?php
$intvar=4.5;
$floatvar=7.5;
$strvar="Hello";
$boolvar="Ranjan";
$nullval='null';
if(is_int($intvar))
{
echo "$intvar is integer";
}
else
{
echo "$intvar is not integer";
}
if(is_float($floatvar))
{
echo "$intvar is float";
}
else
{
echo "$intvar is not float";
}
if(is_string($strvar))
{
echo "$strvar is string";
}
else
{
echo "$strvar is not string";
}
if(is_bool((bool)$boolvar))
{
echo "$boolvar is boolean ";
}
else
{
echo "$boolvar is not boolean and value is false";
}
if(is_bool((bool)$nullval))
{
echo "$nullval is boolean and value is true";
}
else
{
echo "$nullval is not boolean and value is false";
}

Partial preview of the text

Download PHP Data type program and more Exercises Computer Science in PDF only on Docsity!