Skip to content

Commit 9418ae1

Browse files
authored
Document T_PROPERTY_C constant (#4184)
Drive-by fixes and nits
1 parent c1c803c commit 9418ae1

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

appendices/tokens.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,13 @@ defined('T_FN') || define('T_FN', 10001);
715715
property hooks (available as of PHP 8.4.0)
716716
</entry>
717717
</row>
718+
<row xml:id="constant.t-property-c">
719+
<entry><constant>T_PROPERTY_C</constant></entry>
720+
<entry>__PROPERTY__</entry>
721+
<entry>
722+
<link linkend="language.constants.predefined">magic constants</link>
723+
</entry>
724+
</row>
718725
<row xml:id="constant.t-protected">
719726
<entry><constant>T_PROTECTED</constant></entry>
720727
<entry>protected</entry>

language/constants.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ echo ANIMALS[1]; // outputs "cat"
252252
<sect1 xml:id="language.constants.magic">
253253
<title>Magic constants</title>
254254
<para>
255-
There are nine magical constants that change depending on
255+
There are a few magical constants that change depending on
256256
where they are used. For example, the value of
257257
<constant>__LINE__</constant> depends on the line that it's
258-
used on in your script. All these "magical" constants are resolved
258+
used on in a script. All these "magical" constants are resolved
259259
at compile time, unlike regular constants, which are resolved at runtime.
260260
These special constants are case-insensitive and are as follows:
261261
</para>
@@ -303,8 +303,8 @@ echo ANIMALS[1]; // outputs "cat"
303303
<entry>
304304
The class name. The class name includes the namespace
305305
it was declared in (e.g. <literal>Foo\Bar</literal>).
306-
When used
307-
in a trait method, __CLASS__ is the name of the class the trait
306+
When used inside a trait method,
307+
<constant>__CLASS__</constant> is the name of the class the trait
308308
is used in.
309309
</entry>
310310
</row>
@@ -324,7 +324,9 @@ echo ANIMALS[1]; // outputs "cat"
324324
<row xml:id="constant.property">
325325
<entry><constant>__PROPERTY__</constant></entry>
326326
<entry>
327-
Only valid inside a <link linkend="language.oop5.property-hooks">property hook</link>. It is equal to the name of the property.
327+
Only valid inside a
328+
<link linkend="language.oop5.property-hooks">property hook</link>.
329+
It is equal to the name of the property.
328330
</entry>
329331
</row>
330332
<row xml:id="constant.namespace">

0 commit comments

Comments
 (0)