How-to articles, tricks, and solutions about PHP-7

"Typed property must not be accessed before initialization" error when introducing properties type hints?

In PHP, the "Typed property must not be accessed before initialization" error is encountered when a property is defined with a type hint, but it is accessed before it has been explicitly assigned a value.

configure: error: Please reinstall the libzip distribution

This error message is indicating that there is a problem with the libzip library that is preventing a program from being configured.

How can I enable the MySQLi extension in PHP 7?

To enable the MySQLi extension in PHP 7, you need to follow these steps.

install php70-gd on ubuntu

To install the php70-gd package on Ubuntu, you will need to have the package manager apt-get installed.

Installing the PHP 7 MongoDB Client/Driver?

To install the PHP 7 MongoDB driver, you can use the PECL (PHP Extension Community Library) command-line tool.

Nullable return types in PHP7

In PHP7, nullable return types were introduced, allowing a function to return either a specific type or null.

PHP 7: Missing VCRUNTIME140.dll

It looks like you are encountering an error related to a missing VCRUNTIME140.dll file when using PHP 7.

Type hinting in PHP 7 - array of objects

In PHP 7, type hinting can be used to specify the expected data type of a function or method parameter.