Motivated by https://github.com/sebastianbergmann/phpunit/pull/5905#issuecomment-2257470871.
Motivated by #5905 (comment).