PHP cheatsheet
Syntax snippets and quick notes for revision.
PHP Introduction
<?php
$lesson = "PHP Introduction";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this php introduction pattern when a PHP task needs a small, readable starting point.
PHP Syntax
<?php
$lesson = "PHP Syntax";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this php syntax pattern when a PHP task needs a small, readable starting point.
Variables and Constants
<?php
$lesson = "Variables and Constants";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this variables and constants pattern when a PHP task needs a small, readable starting point.
Data Types
<?php
$lesson = "Data Types";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this data types pattern when a PHP task needs a small, readable starting point.
Operators
<?php
$lesson = "Operators";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this operators pattern when a PHP task needs a small, readable starting point.
Conditional Statements
<?php
$lesson = "Conditional Statements";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this conditional statements pattern when a PHP task needs a small, readable starting point.
Loops
<?php
$lesson = "Loops";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this loops pattern when a PHP task needs a small, readable starting point.
Functions
<?php
$lesson = "Functions";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this functions pattern when a PHP task needs a small, readable starting point.
Arrays Basics
<?php
$lesson = "Arrays Basics";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this arrays basics pattern when a PHP task needs a small, readable starting point.
Array Methods
<?php
$lesson = "Array Methods";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this array methods pattern when a PHP task needs a small, readable starting point.
String Functions
<?php
$lesson = "String Functions";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this string functions pattern when a PHP task needs a small, readable starting point.
Superglobals
<?php
$lesson = "Superglobals";
$checklist = ["understand", "run", "change", "explain"];
echo $lesson . ": " . implode(" -> ", $checklist);Use this superglobals pattern when a PHP task needs a small, readable starting point.