Open nielsdos opened 1 year ago
This is because php_sxe_iterator_fetch
lets the iterator point at the first element node. That's right for SXE_ITER_ELEMENT
but not for SXE_ITER_NONE
, especially considering that forwards iterating from that point does not skip PIs.
EDIT: and so, this problem also occurs with comments... (https://bugs.php.net/bug.php?id=43542 looks somewhat related in that it points out a similar inconsistency wrt iterators & nodes)
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.1+
Operating System
Linux