Doc #71578 [Com]: object, mixed and numeric are not reserved words
| From: | tpunt@php.net | Date: | Sun, 21 Feb 2016 23:00:21 +0000 |
| Subject: | Doc #71578 [Com]: object, mixed and numeric are not reserved words | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13206@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
Comment by: tpunt@php.net
Reported by: david at grudl dot com
Summary: object, mixed and numeric are not reserved words
Status: Re-Opened
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
What about splitting the list into actual reserved words and soft reserved words?
Patch diff: https://gist.github.com/tpunt/906fe83e8d91dd75eaed
Previous Comments:
------------------------------------------------------------------------
[2016-02-12 22:06:50] bwoebi@php.net
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.
------------------------------------------------------------------------
[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