Bug #70610 [Opn->Csd]: Misleading example of "illegal" importing rule

From: Date: Tue, 14 Jun 2016 17:03:33 +0000
Subject: Bug #70610 [Opn->Csd]: Misleading example of "illegal" importing rule
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13528@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70610&edit=1 ID: 70610 Updated by: cmb@php.net Reported by: krewecherl at gmail dot net Summary: Misleading example of "illegal" importing rule -Status: Open +Status: Closed Type: Bug Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, Stefan, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2016-06-14 17:01:43] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339351 Log: Fix #70610: Misleading example of &quot;illegal&quot; importing rule ------------------------------------------------------------------------ [2015-09-30 17:22:20] krewecherl at gmail dot net Description: ------------ Referring to the English manual page about "Using namespaces: Aliasing/Importing" http://php.net/manual/en/language.namespaces.importing.php Example #5 is supposed to show an illegal importing rule. What it actually shows is something different: the insertion of a Trait. This is (now) perfectly valid PHP, it just does something different from what the page is describing. I assume the example was added before we had traits; it should be updated to avoid confusion. Since the preceding paragraph is referring to scope, perhaps the class should be replaced by a function. Test script: --------------- <?php // not a test script, this is example #5 from the manual page namespace Languages; class Greenlandic { use Languages\Danish; ... } ?> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70610&edit=1

« previous php.doc.bugs (#13528) next »