ForbiddenNames: add `parent` + `self` to "other" reserved names by jrfnl · Pull Request #1940 · PHPCompatibility/PHPCompatibility

@jrfnl

Looks like these have been forbidden for use as OO construct names since PHP 5.0, but are still allowed as function/constant names, making these "other" reserved names.

Verified via 3v4l.
Examples:
https://3v4l.org/P6c7v
https://3v4l.org/Ib9Qk

Also see: php/doc-en 4955

wimg

wimg approved these changes Oct 27, 2025

@wimg wimg deleted the feature/forbiddennames-add-parent-self branch

October 27, 2025 20:22