PHP enums: a case is an object, not a constant
Enums have been in PHP since 8.1, and a case is a real object rather than a compiler-optimised constant. That split is what makes them useful: the statics find a case, and the case…
How-to library
Search 271 practical tutorials on Linux, servers, PHP, MySQL and the web.
Enums have been in PHP since 8.1, and a case is a real object rather than a compiler-optimised constant. That split is what makes them useful: the statics find a case, and the case…
A version upgrade is usually read as a list of what stops working. This is the other half: three pieces of modern PHP syntax you can start using now - chaining off a new…
PHP 8.6 landed on 19 November 2026, and 8.5 stays in active support until the end of 2027, so nothing here is urgent. This is what 8.6 deprecates, what it changes in a running…
Enums have been in PHP since 8.1, and a case is a real object rather than a compiler-optimised constant. That split is…
A version upgrade is usually read as a list of what stops working. This is the other half: three pieces of modern…
PHP 8.6 landed on 19 November 2026, and 8.5 stays in active support until the end of 2027, so nothing here is…
PHP 8.4 leaves active support on 31 December 2026, and 8.5 is the upgrade. This is the list of small conveniences 8.5…
rand() and str_shuffle() are one reproducible generator, and the strings they produce are not the space they look like. What I use…
Five PHP releases on 18 and 19 November closed seventeen security issues, seven of them rated critical. Two are session bugs that…
A version switch is a control-panel setting that takes effect on the next request, and that request is where the surprises live.…
Combine and minify CSS and JS at build time instead of on every request: esbuild bundles the JavaScript, the Tailwind 4 CLI…
The loop I used for years to walk an associative array stopped running when each() was removed. This is how I read…
PHP 8.4 added a second HTML parser to the DOM extension, one that follows the HTML5 algorithm the older class predates. This…