PHP – Cheatsheet

Tags

Never use the close tag at the end of one file to avoid extra white-space

Variables and constants

Variables

Variables are represented by a $ followed by the variable’s name. It’s case-sensitive.

Constants

Types

Booleans

Integers

Floats

Strings

Arrays

Objects

Resource

A resource is a special variable, holding a reference to an external resource.

null

Callables

Operators

Commons

Bitwise

Assignment

Comparison