PHP cheatsheet
Strings
$name = 'Dan';
'My name is ' . $name; // Concatenation
"My name is $name"; // Interpolation
Arrays
$fruits = [];
$fruits[] = 'apple'; // Array push
Write to built-in server stdout
Useful for local debugging.
define('STDOUT', fopen('php://stdout', 'w'));
fwrite(STDOUT, $str);