“PCRE” stands for “Perl Compatible Regular Expressions”. In PHP, this refers to functions like “preg_replace” and “preg_split”. The patterns used in these functions can have modifiers applied to them, and this section list those modifiers and what they do.

The PHP cheat sheet is designed to be printed on an A4 sheet of paper and live by a developers desk, to make life a bit easier. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size PHP cheat sheet.

Function List

Probably the biggest problem with PHP is its inconsistency. Some function names use underscores, some don’t. Some are of the form “verb object” and some are “object verb”. Some use “2″ instead of “to”. The side sections of the cheat sheet list many of the most commonly used functions in PHP and are there to provide a quick reference to check function names.

SuperGlobals

In PHP, SuperGlobals are available at any point in a script, and allow access to data from the user and session date, as well as information about server settings and environmental data. This section contains a list of SuperGlobal variable names.

Date Formatting

There are, as I’m sure you are aware, a huge number of options when it comes to date formatting, and there are few people who remember all of them. This section of the cheat sheet lists the various options, followed by a description, and an example where appropriate.

Regular Expression Syntax

Many people have trouble with regular expressions, and the first step to coming to grips with them is to become familiar with the various symbols used in regular expressions and their meaning. This section lists these symbols and describes their meaning.

PCRE Modifiers

“PCRE” stands for “Perl Compatible Regular Expressions”. In PHP, this refers to functions like “preg_replace” and “preg_split”. The patterns used in these functions can have modifiers applied to them, and this section list those modifiers and what they do.

Function Argument Orders

One of the other major inconsistencies in PHP is function argument ordering. Functions that are very very similar often completely opposite ordering of arguments. This section simply lists a few of the common ones people are sometimes confused by, or that people find easy to forget.

fopen() Modes

fopen() is a widely used function and has several modes in which it can operate, depending on whether you want to read or write to a file, and what you want to do with data already in that file. This section lists those modes and what each does.

The HTML Character Entities cheat sheet is designed to act as a reference sheet, listing the various character codes in HTML.

In keeping with the other cheat sheets, here’s a thumbnail of the cheat sheet and brief description. It’s really pretty simple, this one. There are four columns. Each of those columns is further divided into three. On the left is the actual code for the character. In the middle, the character itself, and on the right, the description of the character. And that’s it!

The more astute of you may spot that the list appears to miss out numbers. Some characters are unassigned in HTML, or assigned specific values that do not translate to characters (for example, tabs and line feeds). For this reason, they are omitted.