note 111545 added to language.namespaces.definitionmultiple

From: Date: Sat, 02 Mar 2013 14:28:58 +0000
Subject: note 111545 added to language.namespaces.definitionmultiple
Groups: php.notes 
Request: Send a blank email to php-notes+get-193776@lists.php.net to get a copy of this message
Should be confusing what rwn dot gallego at gmail dot com and kothnok at gmail dot com meant. E.g., this won't work with declared global namespace in the same file as this won't allow semicolon and (!) brackets. To keep syntax actually it would be: <?php namespace foo\bar { class myClass{ function myTest(){ echo "test"; } } } namespace another\bar { use \foo\bar\myClass; // pay attention to leading backslash even if "subnamespace syntax" works $a = new myClass(); $a->myTest(); // or $a = new \foo\bar\myClass(); // again leading backslash as only this works $a->myTest(); } ?> ---- Server IP: 69.147.83.199 Probable Submitter: 77.186.48.190 ---- Manual Page -- http://php.net/manual/en/language.namespaces.definitionmultiple.php Edit -- https://master.php.net/note/edit/111545 Del: integrated -- https://master.php.net/note/delete/111545/integrated Del: useless -- https://master.php.net/note/delete/111545/useless Del: bad code -- https://master.php.net/note/delete/111545/bad+code Del: spam -- https://master.php.net/note/delete/111545/spam Del: non-english -- https://master.php.net/note/delete/111545/non-english Del: in docs -- https://master.php.net/note/delete/111545/in+docs Del: other reasons-- https://master.php.net/note/delete/111545 Reject -- https://master.php.net/note/reject/111545 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#193776) next »