The composer.json file is an important component of any PHP project that utilizes Composer. It serves as a manifest file containing essential information about the project, including its dependencies, autoload...
Composer is a dependency management tool for PHP that allows developers to easily manage and install packages required by their projects. It provides a straightforward way to discover and install...
Ensuring that the project's dependencies are up-to-date is important. Outdated packages can bring about bugs, security vulnerabilities, and compatibility conflicts. By actively identifying and updating these outdated packages, we can...
There may be times when you need to retrieve information about a specific installed PHP package, such as its version, dependencies, or even the package's source code repository. By knowing...
Managing package dependencies is essential for building robust and efficient applications. Composer, the package manager for PHP, offers many features to simplify the process. One such feature is the ability...
Since PHP 8.2, we can use a new extension named Random for generating random numbers via object-oriented way. Random extension is a part of the PHP core and there is...
Since PHP 8.2, classes can be declared as readonly. This means that all class properties automatically becomes readonly. The readonly properties were introduced in PHP 8.1. These properties can be...
PHP supports various regular expression modifiers that can be used with preg_* functions (e.g. preg_match). For example, the i modifier can be used for case-insensitive match. Since PHP 8.2, we...
Some of the PHP INI directives also accepts shorthand byte values, such as 1K for 1 kilobyte, or 10M for 10 megabytes, etc. 1K equals 1024 bytes. Available options are...
PHP provides the memory_get_peak_usage function that allows to get the absolute peak memory usage, in bytes, allocated by PHP script. However, without reset the memory usage, it is hard to...