Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38579 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32621 invoked from network); 24 Jun 2008 14:36:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2008 14:36:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.94.239.7 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.94.239.7 mail.jdi-ict.nl Linux 2.6 Received: from [82.94.239.7] ([82.94.239.7:42827] helo=mail.jdi-ict.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/39-17106-36601684 for ; Tue, 24 Jun 2008 10:36:20 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.jdi-ict.nl (8.13.7/8.12.11) with ESMTP id m5OEaCxv021929; Tue, 24 Jun 2008 16:36:12 +0200 Date: Tue, 24 Jun 2008 16:36:12 +0200 (CEST) X-X-Sender: derick@kossu.ez.no To: Gregory Beaver cc: Andi Gutmans , Stanislav Malyshev , Dmitry Stogov , internals Mailing List In-Reply-To: <485BD1C0.8040302@chiaraquartet.net> Message-ID: References: <485BD1C0.8040302@chiaraquartet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Subject: Re: [PHP-DEV] simple solution to another namespace conundrum? From: derick@php.net (Derick Rethans) On Fri, 20 Jun 2008, Gregory Beaver wrote: > The user is obviously intentionally creating a "DateTime" class, and > doesn't care about the internal classname in this script. > > The attached patch against PHP_5_3 would fix the issue by eliminating > the check for conflict with CG(class_table) in the global namespace for > internal classes. It however preserves this check for userspace classes > so that (for instance) php-src/tests/Zend/ns_030.phpt does not fail. > The basic idea is that we do have control over the userspace classes we > include, but have no control over the internal classes. I am not so sure this is a good idea. I mean, for the developer that writes the code it's obvious that his version of DateTime is used. But for a second developer to come back later this could be a great WTF factor a few years down the road - wondering why the DateTime documentation on php.net doesn't match with what the class does. regards, Derick