1
0
mirror of https://github.com/php/doc-en.git synced 2026-04-24 15:58:14 +02:00
Files
archived-doc-en/reference/xml/examples.xml
T
Christoph M. Becker f5992156e6 Fix XMLParser example for more recent PHP versions (#1662)
The example uses the `$parser` as array index, but that implicit
conversion to integer already raises a notice as of PHP 7.0.0, and
outright fails as of PHP 8.0.0, since the `$parser` is an object now.

Since there doesn't appear a good reason for `$depth` to be an array
which supports different parsers, we change it to an integer, what also
simplifies the example.

This basically integrates user note 127199.
2022-07-01 15:12:48 -05:00

8.9 KiB