Category

Vanilla PHP

Exploring PHP 8.5's New Pipe Operator: A Fresh Perspective

Among the exciting features in PHP 8.5, the pipe operator stands out as a game-changing addition to the language's syntax arsenal. This innovative operator transforms how we write sequential operations, making code more intuitive and less nested. Let's dive into this new feature and discover how it can revolutionize your PHP coding practices.

0 min read - 8 views -

Exploring Coroutines in PHP

The term "coroutine" often comes up when talking about asynchronous or non-blocking code, but what does it actually mean? In this post, we will explore coroutines as a concept and see how PHP supports them through Generators and Fibers. Whether you're building pipelines, CLI tools, or preparing to dive into concurrency, understanding coroutines is an essential first step.

The "never" Type in PHP

There may be times when you're writing a function in PHP that you know will never return a value. This could be because the function always throws an exception, or maybe calls exit or die. In these cases, you might want to use the never type.

Shorthand comparisons in PHP

You probably already know some comparison operators in PHP. Things like the ternary ?:, the null coalescing ?? and the spaceship <=> operators. But do you really know how they work? Understanding these operators makes you use them more, resulting in a cle

PHP 8.3 Released

PHP 8.3 is a major update of the PHP language. It contains many new features, such as explicit typing of class constants, deep-cloning of readonly properties and additions to the randomness functionality. As always it also includes performance improvement