Docker Hub is a cloud-based repository of Docker images, in which users can create, test, and store images that can be downloaded by other communities. Before pushing image to Docker...
When working with Docker, it can be useful to get detailed information about Docker containers. It includes container creation date, state, host configuration, network settings, mounts, etc. This tutorial explains...
When working with Docker, it can be useful to get detailed information about Docker volumes. It includes volume creation date, driver, mount point, scope, etc. This tutorial demonstrates how to...
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...
Traits provide a way to reuse code in classes without using inheritance. All properties and methods declared in trait are available within the class. Since PHP 8.2, we can use...
Since PHP 8.0, we can use union types, where the value should be one of the specified types. Since PHP 8.1, we can use intersection types, where the value should...