Since PHP 8.1, class properties can be declared as readonly. This means that class property can be initialized once and cannot be modified later. Readonly properties are declared with readonly...
PHP has spread operator (...) which allows unpacking arrays. When array is prefixed with spread operator, an array elements are spread in place. The spread operator can be used multiple...
PHP provides the fputcsv function which formats an array of fields as a CSV line and writes it to a file. Since PHP 8.1, this function accepts a new optional...
AVIF is a pretty new image format compared with PNG or JPEG. Since PHP 8.1, GD extension can be compiled with AVIF support.
The gd_info function returns features of the...
PHP allows specifying types for function and class method parameters. Passing null to a non-nullable parameter will emit a fatal error. In versions prior to PHP 8.1, this behavior only...
MySQLi is a PHP extension that allows to use the functionality provided by MySQL database. MySQLi supports five different error modes, which defines how MySQLi should behave when an error...
When working with arrays, there might be a case to determine if an array is a list. Since PHP 8.1, the array_is_list function can be used to check whether a...
There might be cases when we want to hide the part of content or display different content on mobile devices. Usually, we apply different rules for different devices on the...
Simple linear regression is a statistical method that is used to analyze the relationship between two continuous variables:
x - independent variable also known as explanatory or predictor.
y...