LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Ryan Panning Date: Tue Aug 19 21:39:16 2008 Subject: Namespace Global User Function Calls
I can't seem to get global user function calls to work from namespaces
in the latest 5.3 snaps. This is on Win XP SP2 using Apache 2.2.8 and
the php5apache2_2.dll. Example:
global_file.php
---------------
require 'namespace_file.php';
function globalFunc() {
'Global Called!';
}
TestNS::callGlobalFunc();
namespace_file.php
------------------
namespace TestNS;
function callGlobalFunc() {
::globalFunc();
}
| Navigate in group php.internals at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |