1-2-3 PHP operators

1-2-3 PHP operators I learnt my PHP on a European keyboard, and it was always a pain to use some strange symbols. When I moved to Canada, I quickly realized that the chosen symbols were actually very easily accessible on the keyboard: it was just my layout that was less practical. Then, I also realized […]

PHP parentheses usage

The Required, The Optional, The Useless, and The Weird: of In PHP, parentheses () aren’t just punctuation : they play different roles depending on where and how they’re used. Some are compulsory, others are optional, and a few are just useless clutter. And then, there’s the weird one: (cast). Let’s review all PHP parentheses usages […]

PHP error messages encyclopedia

PHP Error Messages Encyclopedia If you’ve ever coded, you’ve likely encountered cryptic error messages that left you scratching your head. Whether it’s a syntax error, an unexpected function call issue, or a deprecated feature warning, debugging can be a frustrating experience: this also happens with PHP. That’s where the PHP Error Message Encyclopedia (PEME) comes […]

PHP Constructors and Inheritance

PHP Constructors and Inheritance When working in OOP PHP, understanding constructors is essential for manipulating objects. Constructors are magic methods that get invoked when an object is instantiated from a class. They typically handle the initialization of an object’s properties. These initialisations are split between parent and child classes, and the relationship between parent and […]

Bitwise and Logical Operators in PHP

Bitwise and logical operators

Difference Between Bitwise and Logical Operators in PHP The distinction between bitwise operators and logical operators operators is often overlooked and confused. They are often used one for another: it is true they have some overlapping domains of application, and yet, their functionality differ significantly. Here’s a breakdown of how these operators work: Logical Operators: […]