These commands are active on the PHP course. Since PHP files interleave markup, the HTML tag commands listed above also work here.
PHP Tags & Comments
Say: "php open tag" or "open php"
<?php
Say: "php close tag" or "close php"
?>
Say: "php echo tag" or "short echo tag"
<?=
Say: "php comment" or "inline comment"
//
Say: "block comment"
/* */
Say: "doc block" or "doc comment"
/** */
Say: "declare strict types"
declare(strict_types=1);
Variables & Member Access
Say: "dollar sign" or "dollar"
$
Say: "variable" or "variable named"
$
Say: "arrow" or "arrow operator"
->
Say: "null safe" or "null safe operator"
?->
Say: "double arrow" or "fat arrow"
=>
Say: "double colon" or "scope resolution"
::
Say: "dollar this" or "this object"
$this
Say: "parent scope"
parent::
Say: "static scope"
static::
Say: "class constant"
::class
Superglobals
Say: "dollar get" or "get superglobal"
$_GET
Say: "dollar post" or "post superglobal"
$_POST
Say: "dollar request"
$_REQUEST
Say: "dollar session" or "session superglobal"
$_SESSION
Say: "dollar cookie"
$_COOKIE
Say: "dollar server" or "server superglobal"
$_SERVER
Say: "dollar files"
$_FILES
PHP Operators
Say: "equals" or "assign"
=
Say: "loose equals" or "double equals"
==
Say: "identical to" or "triple equals"
===
Say: "not identical to"
!==
Say: "greater than or equal"
>=
Say: "less than or equal"
<=
Say: "null coalescing"
??
Say: "null coalescing assignment"
??=
Say: "elvis operator" or "short ternary"
?:
Say: "dot equals" or "concat equals"
.=
Say: "increment" or "plus plus"
++
Say: "decrement" or "minus minus"
--
Say: "logical and" or "and"
&&
Say: "logical or" or "or"
||
Say: "logical not" or "not"
!
Say: "exponent operator" or "to the power of"
**
Say: "spread operator" or "variadic"
...
Say: "instanceof"
instanceof
Includes & Namespacing
Say: "require once"
require_once
Say: "include once"
include_once
Say: "namespace"
namespace
Control Flow
Say: "if statement"
if () {
}
Say: "else if" or "elseif"
elseif
Say: "for loop"
for ($i = 0; $i < $n; $i++) {
}
Say: "foreach loop" or "foreach as"
foreach ($array as $item) {
}
Say: "foreach as key value"
foreach ($array as $key => $value) {
}
Say: "while loop"
while () {
}
Say: "do while"
do {
} while ();
Say: "switch statement"
switch () {
case :
break;
default:
break;
}
Say: "match expression"
match () {
}
Say: "try catch"
try {
} catch (Exception $e) {
}
Say: "yield" / "yield from"
yield / yield from
Say: "endforeach" / "endif"
endforeach; / endif;
Output & Debugging
Say: "var dump"
var_dump()
Say: "var export"
var_export()
Say: "printf" / "sprintf"
printf() / sprintf()
Say: "number format"
number_format()
Functions & Classes
Say: "anonymous function"
function () {
}
Say: "arrow function"
fn() =>
Say: "closure"
function () use () {
}
Say: "interface" / "trait" / "enum"
interface / trait / enum
Say: "extends" / "implements"
extends / implements
Say: "public" / "private" / "protected"
public / private / protected
Say: "static" / "final" / "abstract"
static / final / abstract
Say: "constructor"
__construct
Say: "destructor"
__destruct
Say: "to string"
__toString
Say: "magic get" / "magic set"
__get / __set
Say: "magic call" / "magic invoke"
__call / __invoke
Say: "get class"
get_class()
Say: "method exists"
method_exists()
Say: "class exists"
class_exists()
Say: "function exists"
function_exists()
Say: "call user func"
call_user_func()
Types & Type Checks
Say: "int" / "float" / "bool"
int / float / bool
Say: "string" / "array" / "mixed"
string / array / mixed
Say: "void" / "iterable" / "callable"
void / iterable / callable
Say: "is array"
is_array()
Say: "is string"
is_string()
Say: "is int" or "is integer"
is_int()
Say: "is float"
is_float()
Say: "is numeric"
is_numeric()
Say: "is object"
is_object()
Say: "is callable"
is_callable()
Say: "get type" / "set type"
gettype() / settype()
Say: "int val" / "float val"
intval() / floatval()
Say: "string val" / "bool val"
strval() / boolval()
Say: "true" / "false" / "null"
true / false / null
String Functions
Say: "string length" or "str len"
strlen()
Say: "string to upper" or "to upper case"
strtoupper()
Say: "string to lower" or "to lower case"
strtolower()
Say: "u c first" or "upper case first"
ucfirst()
Say: "u c words"
ucwords()
Say: "string replace"
str_replace()
Say: "string repeat" / "string pad"
str_repeat() / str_pad()
Say: "string split"
str_split()
Say: "string contains"
str_contains()
Say: "string starts with"
str_starts_with()
Say: "string ends with"
str_ends_with()
Say: "string position" or "str pos"
strpos()
Say: "string reverse"
strrev()
Say: "string compare"
strcmp()
Say: "substring" or "sub string"
substr()
Say: "trim" / "left trim" / "right trim"
trim() / ltrim() / rtrim()
Say: "implode" or "join array"
implode()
Say: "word wrap"
wordwrap()
Say: "html special chars"
htmlspecialchars()
Say: "html entities"
htmlentities()
Say: "strip tags"
strip_tags()
Say: "json encode" / "json decode"
json_encode() / json_decode()
Say: "url encode"
urlencode()
Say: "preg match" / "preg match all"
preg_match() / preg_match_all()
Say: "preg replace" / "preg split"
preg_replace() / preg_split()
Say: "nowdoc"
<<<'EOT'
EOT;
Array Functions
Say: "empty array" or "array literal"
[]
Say: "associative array"
['key' => 'value']
Say: "array push" / "array pop"
array_push() / array_pop()
Say: "array shift" / "array unshift"
array_shift() / array_unshift()
Say: "array merge"
array_merge()
Say: "array keys" / "array values"
array_keys() / array_values()
Say: "array map"
array_map()
Say: "array filter"
array_filter()
Say: "array reduce"
array_reduce()
Say: "array slice" / "array splice"
array_slice() / array_splice()
Say: "array search"
array_search()
Say: "array key exists"
array_key_exists()
Say: "array sum" / "array product"
array_sum() / array_product()
Say: "array reverse"
array_reverse()
Say: "array unique"
array_unique()
Say: "array combine" / "array flip"
array_combine() / array_flip()
Say: "array fill" / "array column"
array_fill() / array_column()
Say: "array chunk" / "array diff"
array_chunk() / array_diff()
Say: "array intersect" / "array rand"
array_intersect() / array_rand()
Say: "in array"
in_array()
Say: "sort array" / "reverse sort"
sort() / rsort()
Say: "u sort" / "a sort" / "k sort"
usort() / asort() / ksort()
Say: "shuffle" / "range"
shuffle() / range()
Say: "compact" / "extract"
compact() / extract()
Math Functions
Say: "ceiling" / "floor function"
ceil() / floor()
Say: "int div" / "f mod"
intdiv() / fmod()
Say: "random" / "m t rand"
rand() / mt_rand()
Say: "minimum" / "maximum"
min() / max()
Dates & Files
Say: "date function"
date()
Say: "string to time" / "mk time"
strtotime() / mktime()
Say: "date time" / "date interval"
DateTime / DateInterval
Say: "default timezone"
date_default_timezone_set()
Say: "file get contents"
file_get_contents()
Say: "file put contents"
file_put_contents()
Say: "file exists"
file_exists()
Say: "f open" / "f close"
fopen() / fclose()
Say: "f read" / "f write" / "f gets"
fread() / fwrite() / fgets()
Say: "unlink" / "make directory"
unlink() / mkdir()
Say: "scan directory"
scandir()
Say: "is file" / "is directory"
is_file() / is_dir()
Say: "base name" / "dir name"
basename() / dirname()
Say: "path info"
pathinfo()
Web, Sessions & Security
Say: "session start" / "session destroy"
session_start() / session_destroy()
Say: "set cookie"
setcookie()
Say: "header function"
header()
Say: "header location"
header('Location: ')
Say: "http response code"
http_response_code()
Say: "filter var"
filter_var()
Say: "password hash"
password_hash()
Say: "password verify"
password_verify()
Say: "hash function" / "unique id"
hash() / uniqid()
Say: "m d five" / "s h a one"
md5() / sha1()
Databases (PDO & MySQLi)
Say: "pdo" / "new pdo"
PDO / new PDO()
Say: "prepare statement"
prepare()
Say: "execute statement"
execute()
Say: "fetch all"
fetchAll()
Say: "fetch assoc"
fetch(PDO::FETCH_ASSOC)
Say: "bind param"
bindParam()
Say: "mysqli connect"
mysqli_connect()
Say: "mysqli query"
mysqli_query()
Exceptions & Constants
Say: "exception" / "error"
Exception / Error
Say: "type error" / "value error"
TypeError / ValueError
Say: "argument count error"
ArgumentCountError
Say: "invalid argument exception"
InvalidArgumentException
Say: "runtime exception"
RuntimeException
Say: "division by zero error"
DivisionByZeroError
Say: "json exception"
JsonException
Say: "get message"
getMessage()
Say: "php end of line"
PHP_EOL
Say: "php int max" / "php version"
PHP_INT_MAX / PHP_VERSION
Say: "magic dir" / "magic file"
__DIR__ / __FILE__
Say: "magic line" / "magic class"
__LINE__ / __CLASS__
Say: "magic function" / "magic method"
__FUNCTION__ / __METHOD__
Say: "die" / "exit"
die() / exit;
or