Doc #71578 [Nab->ReO]: object, mixed and numeric are not reserved words
| From: | bwoebi@php.net | Date: | Fri, 12 Feb 2016 22:06:51 +0000 |
| Subject: | Doc #71578 [Nab->ReO]: object, mixed and numeric are not reserved words | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13188@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71578&edit=1
ID: 71578
Updated by: bwoebi@php.net
Reported by: david at grudl dot com
Summary: object, mixed and numeric are not reserved words
-Status: Not a bug
+Status: Re-Opened
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
It still is badly worded. Reading the whole:
> These words cannot be used to name a class, interface or a trait. These words are also
> prohibited from being used in namespaces. Some of the words are reserved to enable future PHP
> features without breaking backward compatibility.
It suggests that none of these words can be used currently, just that some of them don't have
any use yet. It doesn't say that some of these can still be used, but is just not advised.
Previous Comments:
------------------------------------------------------------------------
[2016-02-12 21:16:26] cmb@php.net
The documentation already states:
| Some of the words are reserved to enable future PHP features
| without breaking backward compatibility.
So this is "not a bug".
------------------------------------------------------------------------
[2016-02-12 19:32:55] bwoebi@php.net
They are reserved, but not prohibited from usage.
The emphasis is on *reserved*; that it is strongly advised to not use them, as it is not that
unlikely that future code will prohibit its usage.
------------------------------------------------------------------------
[2016-02-12 17:33:45] david at grudl dot com
And *resource* too
------------------------------------------------------------------------
[2016-02-12 17:32:08] david at grudl dot com
Description:
------------
Words *object, mixed, numeric* are listed as reserved word in documentation http://php.net/manual/en/reserved.other-reserved-words.php,
but they are not reserved https://github.com/php/php-src/blob/d1b777bd992525ced913a033bd7fff9490614f52/Zend/zend_compile.c#L151
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71578&edit=1