Home Linux HTML/CSS PHP React VR T-shirt Shop Blog PHP Fiddle

Intro to PHP: Datatypes

Watch my Youtube Tutorial: Datatypes, variables, && constants



Here are PHP datatypes, definitions and examples

Datatype Definition Example
String Characters $name = 'Steve';
Integer Whole Number $gameLevel = 10;
Float Decimal Number $probability = .08;
Boolean True or False $win = true;
Array Stores Multiple Values $cards = array ('hearts','spades','diamonds','clubs');
Object Defined by its Variables
& Functions
class Fruit { function fruit() { $this->model = "apple"; } }
Null No Value $newGame = NULL;

Continue to Next Lesson