PHP
Syntax
PHP executes statements inside PHP tags; statements end with semicolons.
REFERENCE CATEGORY
23 practical topics
PHP
PHP executes statements inside PHP tags; statements end with semicolons.
PHP
PHP has scalar, compound, and special types.
PHP
Variables begin with $ and can hold different values over time.
PHP
Arrays are ordered key/value maps.
PHP
Filter selects values; sorting changes their order.
PHP
Strings contain bytes; concatenation uses a dot.
PHP
Functions give a named operation explicit inputs and a return value.
PHP
Classes combine behavior with state.
PHP
An interface defines a contract that implementations must satisfy.
PHP
Traits reuse method implementations across classes.
PHP
Enums define a closed set of named values.
PHP
A constructor initializes an object; promotion declares and assigns properties.
PHP
public, protected, and private control access to members.
PHP
Static members belong to the class rather than an instance.
PHP
Exceptions interrupt execution until caught; Throwable covers Error and Exception.
PHP
Namespaces avoid name collisions and organize symbols.
PHP
Closures are anonymous functions that can capture outer values.
PHP
Arrow functions express one expression and capture outer variables by value.
PHP
Parameter, property, and return types express allowed values.
PHP
?? supplies a default for absent/null values; ?-> stops a chain on null.
PHP
match returns a value using strict comparisons.
PHP
Standard functions handle common collection, JSON, date, and validation tasks.
PHP
PDO provides parameterized database access in plain PHP.