Parsing arrays in PHP 8.4: foreach, ArrayIterator and generators
The loop I used for years to walk an associative array stopped running when each() was removed. This is how I read arrays in PHP 8.4 now: foreach with the key, ArrayIterator when the…
How-to library
Search 263 practical tutorials on Linux, servers, PHP, MySQL and the web.
The loop I used for years to walk an associative array stopped running when each() was removed. This is how I read arrays in PHP 8.4 now: foreach with the key, ArrayIterator when the…
PHP 8.4 added a second HTML parser to the DOM extension, one that follows the HTML5 algorithm the older class predates. This is how the two treat the same broken markup, the UTF-8 trap…
The mongo extension is unmaintained since 2017 and absent from PHP 8.4, which reaches MongoDB through a differently named extension. This is how I install it, the two layers it comes in, and the…
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…
The mongo extension is unmaintained since 2017 and absent from PHP 8.4, which reaches MongoDB through a differently named extension. This is…
The mcrypt extension was removed in PHP 7.2, so the old encrypt and decrypt functions stop the script. This is what I…
The mysql extension was removed in PHP 7.0, and escaping is not the replacement. This is the PDO version: the connection, the…
A race condition in Apache's mod_http2 lets an unauthenticated attacker corrupt memory and run code on servers that offer HTTP/2. Version 2.4.71…
The PHP-FPM pool Debian 13 installs, the php.ini nginx's PHP actually reads, where the socket lives, and the two log lines that…
The commands I run to get Apache serving PHP 8.4 out of MariaDB on Debian 13, the MPM switch the package makes…
One wrapper around cURL that works out by itself whether a response is JSON, proves it from the Content-Type, and lets a…
How I use the PHP Iterator interface: the five methods that make an object walkable with foreach, and iterator_to_array() turning a result…