Web Technologies
PHP Data Types
Smt.M.Jeevana Sujitha
Assistant Professor
Department of Computer Science and Engineering
SRKR Engineering College, Bhimavaram, A.P. - 534204
OBJECTIVES
The Objectives of this lecture are
PHP Data Types
Data Type:
PHP Data Types
String:
<?php
$x = "Hello world!";
$y = 'Hello world!'; echo $x;
echo "<br>"; echo $y;
?>
PHP Data Types
Integer:
2,147,483,648 and 2,147,483,647.
Rules for Integers:
(base 16), octal (base 8), or binary (base 2) notation.
Example:
<?php
$x = 5985;
var_dump($x);
?>
PHP Data Types
PHP Float:
Example:
<?php
$x = 10.365;
var_dump($x);
?>
PHP Data Types
PHP Boolean:
Example:
<?php
$x = true;
$y = false;
?>
PHP Data Types
PHP Array:
Example:
<?php
$cars = array("Volvo","BMW","Toyota"); var_dump($cars);
?>
PHP Data Types
PHP Object:
PHP Data Types
PHP Null:
Example:
<?php
$x = "Hello world!";
$x = null; var_dump($x);
?>
PHP Data Types
PHP Resource:
THANK YOU