Category: Vanilla PHP

Community Vanilla PHP

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

stitcher.io

310 clicks
310 views

Community Vanilla PHP

Building Maintainable PHP Applications: Over-engineering vs under-engineering

Overengineering (or over-engineering) is the act of designing a product or providing a solution to a problem in an elaborate or complicated manner, where a simpler solution can be demonstrated to exist with the same efficiency and effectiveness as that of

davorminchorov.com

279 clicks
279 views

Community Vanilla PHP

PHP Attributes: how to use PHP Attributes and create custom attribute classes – Fast Tips

PHP attributes were introduced in PHP 8.0. This version marked a significant milestone for the language, bringing several new features and improvements, including the introduction of attributes for adding metadata to code declarations.

inspector.dev

434 clicks
434 views

Community Vanilla PHP

Building a procedurally generated game with PHP

Today, we're building a procedurally generated, 2D game with PHP. It's a simple game that's focussed around resource gathering on a procedurally generated map.

stitcher.io

314 clicks
314 views

Community Vanilla PHP

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

www.php.net

277 clicks
277 views

Community Laravel Vanilla PHP

Refactoring conditionals to callables in PHP

Recently, I came across a very handy tip by Nuno Maduro where you can refactor some of the conditionals in your code to callables to make your code more elegant and readable.

www.amitmerchant.com

408 clicks
408 views