Doc #77948 [Com]: Wrong Namespaces FAQ item interpretation/explanation
| From: | dominic dot mayers at meditationstudies dot org | Date: | Sun, 25 Aug 2019 19:46:46 +0000 |
| Subject: | Doc #77948 [Com]: Wrong Namespaces FAQ item interpretation/explanation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16907@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77948&edit=1
ID: 77948
Comment by: dominic dot mayers at meditationstudies dot org
Reported by: dn dot permyakov at gmail dot com
Summary: Wrong Namespaces FAQ item interpretation/explanation
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: MacOS Mojave
PHP Version: 7.1.28
Block user comment: N
Private report: N
New Comment:
Here, "cannot" means "are not allowed to". The item says "Import names are
not allowed to conflict with classes defined in the same file." Is this clearer?
Previous Comments:
------------------------------------------------------------------------
[2019-04-28 08:39:15] dn dot permyakov at gmail dot com
Better description version would be "Import names cannot conflict with aliases existing in the
same file"
------------------------------------------------------------------------
[2019-04-28 08:32:40] dn dot permyakov at gmail dot com
Description:
------------
---
From manual page: https://php.net/language.namespaces.faq
---
There is a list item:
"Import names cannot conflict with classes defined in the same file".
Given example shows that class defined NOT in the SAME file but in the file that included into main
file together with second one.
This changes the sense of the phrase completely. Cause it CAN and WILL conflict with classed defined
in the SAME file(try to move MyClass into file2.php and you'll see)
The description should be something like "Import names cannot conflict with each other" or
something like that.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77948&edit=1