[doc-en] master: List of other reserved words: add "parent" and "self" (#4955)
| From: | Juliette via GitHub | Date: | Fri, 31 Oct 2025 14:13:30 +0000 |
| Subject: | [doc-en] master: List of other reserved words: add "parent" and "self" (#4955) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-22833@lists.php.net to get a copy of this message | ||
Author: Juliette (jrfnl)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2025-10-31T14:13:27Z
Commit: https://github.com/php/doc-en/commit/170b6cda37f29c39b9e08375344c5eb9523b2de3
Raw diff: https://github.com/php/doc-en/commit/170b6cda37f29c39b9e08375344c5eb9523b2de3.diff
List of other reserved words: add "parent" and "self" (#4955)
Page: https://www.php.net/manual/en/reserved.other-reserved-words.php
parent and self can be used as function names and constant names, but
cannot be used as OO construct names since PHP 5.0, making them part of the "other"
reserved keywords.
Example: https://3v4l.org/P6c7v
Note sure why these weren't listed, but feels like they should be.
Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
Changed paths:
M appendices/reserved.xml
Diff:
diff --git a/appendices/reserved.xml b/appendices/reserved.xml
index 36bcfdc89f09..9c50a7f5fda3 100644
--- a/appendices/reserved.xml
+++ b/appendices/reserved.xml
@@ -519,40 +519,48 @@
<tgroup cols="4">
<tbody>
<row>
+ <entry>
+ parent
+ </entry>
+ <entry>
+ self
+ </entry>
<entry>
int
</entry>
<entry>
float
</entry>
+ </row>
+ <row>
<entry>
bool
</entry>
<entry>
string
</entry>
- </row>
- <row>
<entry>
true
</entry>
<entry>
false
</entry>
+ </row>
+ <row>
<entry>
null
</entry>
<entry>
void (as of PHP 7.1)
</entry>
- </row>
- <row>
<entry>
iterable (as of PHP 7.1)
</entry>
<entry>
object (as of PHP 7.2)
</entry>
+ </row>
+ <row>
<entry>
mixed (as of PHP 8.0)
</entry>