Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38988 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37611 invoked from network); 15 Jul 2008 19:55:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2008 19:55:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=foolistbar@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=foolistbar@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.220.157 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: foolistbar@googlemail.com X-Host-Fingerprint: 72.14.220.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:52282] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/4F-11609-6B00D784 for ; Tue, 15 Jul 2008 15:55:35 -0400 Received: by fg-out-1718.google.com with SMTP id 16so2884802fgg.23 for ; Tue, 15 Jul 2008 12:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=dq5XyRrEV01wLAyvgoaCpXOAvjMXzjOW9vNrjVjxr3c=; b=NiVSXGQpXtNtq72cpLfLor/z1X6m1qmityDTijSq/nnnyvWiL73eH9qPMH+YIQtQog AbBLM1R++nIEfdOvoFWb1tYjEAMcb+t89Qw9bC9jBgA46V2dxiIED8vjMqzED4H4R8UE JyQOLjI8lucTgI1//jmfcULgaxplZofPffy+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=tzqX9pnInfR1DUNBXybFi48zu3miZbTk+I0qEFPPg8+J2usQhB8ESnpggRbOCBNGEY YVSEC9Hfrk2C5igAu15181oM3XcekFK6iPJYeK8DQT0KwxXZQl1VfD/bMJgelRhSMTW9 2RXxao4iXmVgC1imFqDhGBMsh5C2VrXscopag= Received: by 10.86.23.17 with SMTP id 17mr809367fgw.32.1216151731782; Tue, 15 Jul 2008 12:55:31 -0700 (PDT) Received: from ?192.168.1.4? ( [87.162.36.87]) by mx.google.com with ESMTPS id l12sm84957fgb.6.2008.07.15.12.55.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 15 Jul 2008 12:55:30 -0700 (PDT) Message-ID: <66558F8B-E13E-4FE7-A9A0-8E6B5AC0BB97@googlemail.com> To: PHP internals Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Tue, 15 Jul 2008 21:55:28 +0200 X-Mailer: Apple Mail (2.926) Subject: Include/require into namespace From: foolistbar@googlemail.com (Geoffrey Sneddon) Hi, With the impending release of PHP 5.3 and the addition of namespaces into PHP, there becomes the issue of integrating libraries that are designed to still support PHP 4 (please, don't turn this into a discussion about whether they should or not: this _is_ a real issue) into something designed to use namespaces throughout. A simple solution would be to just include/require a file _into_ a namespace, which makes the default namespace in that file that namespace. e.g. (inc. the case of defining a namespace in the included into a namespace file), a.php: b.php: Expected output: Hello, world! Wow! This is in a namespace both here and there! -- Geoffrey Sneddon