com php-langspec: Merge branch 'pull-request/147': spec/09-lexical-structure.md
[email protected] (Stanislav Malyshev) Sat, 02 Jan 2016 03:10:13 +0000
| Newsgroups | php.standards.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 85412b2bd5d75e3b4ea69770c62da42a4c9f7767 Author: Stanislav Malyshev <[email protected]> Fri, 1 Jan 2016 19:10:10 -0800 Parents: bb30b5cf3bc32838b2e2dcb92e6435afef21010a da8869e9feaf692c6e8c0c6b9496030857d4f6c7 Branches: master Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=85412b2bd5d75e3b4ea69770c62da42a4c9f7767 Log: Merge branch 'pull-request/147' Conflicts: spec/09-lexical-structure.md Changed paths: MM spec/09-lexical-structure.md Diff: diff --cc spec/09-lexical-structure.md index f371c01,b3f11f7..b81c612 --- a/spec/09-lexical-structure.md +++ b/spec/09-lexical-structure.md @@@ -269,10 -269,8 +269,12 @@@ Unless stated otherwise ([functions](13 Names beginning with two underscores (__) are reserved by the PHP language and should not be defined by the user code. -With the exception of `class`, all [keywords](09-lexical-structures#keywords) can be used as the names of class, interface, and trait members. However, `class` can be used as the name of a property or method. +The following names cannot be used as the names of classes, interfaces, or traits: `bool`, `FALSE`, `float`, `int`, `NULL`, `string`, and `TRUE`. + +The following names are reserved for future use and should not be used as the names of classes, interfaces, or traits: `mixed`, `numeric`, `object`, and `resource`. + ++With the exception of `class`, all [keywords](09-lexical-structures#keywords) can be used as names for the members of a class, interface, or trait. However, `class` can be used as the name of a property or method. + Variable names and function names (when used in a function-call context) need not be defined as source tokens; they can also be created at runtime using the [variable name-creation operator](10-expressions.md#variable-name-creation-operator). (For