The instanceof operator allows checking if an object is an instance of a class or that class implements an interface. In versions prior to PHP 8.0, the instanceof operator can...
PHP has built-in web server that designed to use for testing, development or application demonstration purposes. Since 8.0, the built-in web server allows to bind to port 0. It will...
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...