note 85455 added to language.namespaces

From: Date: Mon, 01 Sep 2008 01:01:31 +0000
Subject: note 85455 added to language.namespaces
Groups: php.notes 
Request: Send a blank email to php-notes+get-144038@lists.php.net to get a copy of this message
In response to Amir Abiri's comment: In this example: <?php //--- // global.php class A { public static function foo() { echo "static function"; } } //---- // namespace.php namespace A; function foo() { echo "namespace function"; } ?> The way to call each of these functions is like so: <?php A::foo(); // "namespace function" ::A::foo(); // "static function" ?> This could get pretty confusing, but at least now you know. :) ---- Server IP: 203.88.112.190 Probable Submitter: 121.210.193.35 ---- Manual Page -- http://www.php.net/manual/en/language.namespaces.php Edit -- https://master.php.net/note/edit/85455 Del: integrated -- https://master.php.net/note/delete/85455/integrated Del: useless -- https://master.php.net/note/delete/85455/useless Del: bad code -- https://master.php.net/note/delete/85455/bad+code Del: spam -- https://master.php.net/note/delete/85455/spam Del: non-english -- https://master.php.net/note/delete/85455/non-english Del: in docs -- https://master.php.net/note/delete/85455/in+docs Del: other reasons-- https://master.php.net/note/delete/85455 Reject -- https://master.php.net/note/reject/85455 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144038) next »