Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40027 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42141 invoked from network); 20 Aug 2008 20:41:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2008 20:41:35 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:5514] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/F6-06543-F718CA84 for ; Wed, 20 Aug 2008 16:41:35 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 Aug 2008 23:42:30 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 Aug 2008 13:39:30 -0700 Message-ID: <48AC8102.7030102@zend.com> Date: Wed, 20 Aug 2008 13:39:30 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Ryan Panning CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Aug 2008 20:39:30.0061 (UTC) FILETIME=[D84F7BD0:01C90304] Subject: Re: [PHP-DEV] Namespace Global User Function Calls From: stas@zend.com (Stanislav Malyshev) Hi! > 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(); > } > Tried this code (adding echo before 'Global Called!' so that it would actually output something) - works just fine. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com