Resource is a type of variable that contains a reference to an external resource. It can be database connection, file handle, cURL handle, etc.
Each resource is identified by a...
Traits can have abstract methods. Any class that uses a trait with an abstract method must implement that method. In versions prior to PHP 8.0, the signature of an abstract...
An old-style constructor is a method which has the same name as the class. Old-style constructors were used in PHP 4.
In PHP 5 and PHP 7, we can use...
PHP allows defining type declarations for parameters, return values, and properties. In PHP 7.0 and newer versions, we can use self and parent return types for class methods. Since PHP...
The PCRE extension provides functions that allow to perform a regular expression (regex) matching operations. A regular expression is defined using the same syntax as Perl 5. This extension is...
PHP supports type declarations that can be used for parameters, return values, and properties. However, there may be situations when we need a type that is not supported by PHP...
GD extension allows creating and manipulate different format image files. This extension provides functions like image resizing, cropping, rotating, etc.
Since PHP 8.0, GD extension has been renamed on Windows...
PHP supports error control operator (@) which can be added to an expression beginning. This operator suppresses notices, warnings, and errors that might be generated by the expression.
In versions...
The create_function is a function that allows to create an anonymous function (doesn't have a name). The create_function is based on the eval function which has security issues. Also, it...
PHP supports assertions that trigger an error when a condition is not met. Mostly, assertions are used for testing or debugging purposes during development. PHP provides assert language construct that...