php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77948 Wrong Namespaces FAQ item interpretation/explanation
Submitted: 2019-04-28 08:32 UTC Modified: 2020-08-13 13:04 UTC
From: dn dot permyakov at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: 7.1.28 OS: MacOS Mojave
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dn dot permyakov at gmail dot com
New email:
PHP Version: OS:

 

 [2019-04-28 08:32 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-04-28 08:39 UTC] dn dot permyakov at gmail dot com
Better description version would be "Import names cannot conflict with aliases existing in the same file"
 [2019-08-25 19:46 UTC] dominic dot mayers at meditationstudies dot org
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?
 [2020-08-13 13:04 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-08-13 13:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=70528785e7893febe9d28127ac5142e09f50d1e0
Log: Fix #77948: Wrong Namespaces FAQ item interpretation/explanation
 [2020-08-14 01:45 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=81b1413b2d500196065d233f39e2dc5f77650501
Log: Fix #77948: Wrong Namespaces FAQ item interpretation/explanation
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=542c060e694ed8c4a8f9db691aea007744c84047
Log: Fix #77948: Wrong Namespaces FAQ item interpretation/explanation
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC