Skip to content

Commit 170b6cd

Browse files
authored
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 <[email protected]>
1 parent d01c053 commit 170b6cd

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

appendices/reserved.xml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,40 +519,48 @@
519519
<tgroup cols="4">
520520
<tbody>
521521
<row>
522+
<entry>
523+
parent
524+
</entry>
525+
<entry>
526+
self
527+
</entry>
522528
<entry>
523529
int
524530
</entry>
525531
<entry>
526532
float
527533
</entry>
534+
</row>
535+
<row>
528536
<entry>
529537
bool
530538
</entry>
531539
<entry>
532540
string
533541
</entry>
534-
</row>
535-
<row>
536542
<entry>
537543
true
538544
</entry>
539545
<entry>
540546
false
541547
</entry>
548+
</row>
549+
<row>
542550
<entry>
543551
null
544552
</entry>
545553
<entry>
546554
void (as of PHP 7.1)
547555
</entry>
548-
</row>
549-
<row>
550556
<entry>
551557
iterable (as of PHP 7.1)
552558
</entry>
553559
<entry>
554560
object (as of PHP 7.2)
555561
</entry>
562+
</row>
563+
<row>
556564
<entry>
557565
mixed (as of PHP 8.0)
558566
</entry>

0 commit comments

Comments
 (0)