Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91253 invoked from network); 26 Feb 2009 22:04:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Feb 2009 22:04:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=lewiswright@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lewiswright@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.180 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: lewiswright@gmail.com X-Host-Fingerprint: 209.85.218.180 mail-bw0-f180.google.com Received: from [209.85.218.180] ([209.85.218.180:61718] helo=mail-bw0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/E9-30584-BF117A94 for ; Thu, 26 Feb 2009 17:04:43 -0500 Received: by bwz28 with SMTP id 28so821822bwz.23 for ; Thu, 26 Feb 2009 14:04:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FazfVSogwJ2EXpw7wAv/4gUPSohN/e964i5UcfHZ/7s=; b=gszvHiZBP7SXoBrfR9y9Wksi95kTSUoaU5hYv/kMVRhrVfIZYKaCE1W0Q7wbCS3GhI TzM+2ZZMWC1jBmPXyZb5wB3d/9MD3cNh5Km1yOUNZ6QveX40mo3ybYGDlWrLU1EHAg2h MnffmjI9Ugk6ryIW5b2MZj8sS2i5cdmxq3Xzo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=nhIR1jZa8AsKbOMGHSXDNQ5M+pDP9JdeRpPc7jwJbLq00Q4oT872njZBYHeb5Qek9G r+/wdMsxdHI/Qx0nMc17vvO6JauYgyBlaaBZBu2B9NH5/fDbo66tGbPjP5t+x5aKwpng cwkcqBxXO+OXzit90dTxRzZ7YZ4G8pHxtrNfY= MIME-Version: 1.0 Received: by 10.181.146.14 with SMTP id y14mr607735bkn.70.1235685880404; Thu, 26 Feb 2009 14:04:40 -0800 (PST) In-Reply-To: References: Date: Thu, 26 Feb 2009 22:04:40 +0000 Message-ID: To: viroteck@viroteck.net Cc: Guilherme Blanco , internals Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Class names (with regard to autoload) From: lewiswright@gmail.com (Lewis Wright) I think what you're doing is effectively the same as doing: $fb =3D new Part .''. SubPart(); So basically concatenating a new instance of Part, with the results from the function SubPart. Try defining Part as a class and see what error you get. If I'm right, you'll get an undefined function error. 2009/2/26 Robin Burchell : > On Thu, Feb 26, 2009 at 8:48 PM, Guilherme Blanco > wrote: >> I doubt you'll find a patch to it. >> >> Mainly, the patch will be against this principle: >> > > > Hmm, that wouldn't actually have an impact, as (at least, what I'm > aiming for/wanting to do) is not to introduce periods as valid in > actual class names, but to allow them to be used for autoloading - so > I can have something like this (abbreviated terribly, apologies): > > function __autoload($sFoo) > { > =A0 =A0include(str_replace(".", "/", $sFoo)); > } > > .. so, your example would expand to Foo.Bar, which given that periods > aren't allowed in a class name doesn't exist as a class, and won't > work. Unless I'm missing something? > > > > Actually, I don't believe that expanding is even done - i.e. it > doesn't respect defines there > > Seems that way on testing, too: > > class FooBar > { > =A0 =A0 =A0 =A0// ... > } > > define('Part', =A0'Foo'); > define('SubPart', =A0'Bar'); > > $fb =3D new Part.SubPart(); > > > gives: Fatal error: Class 'Part' not found > > .. but that part of things is a going off on a bit of a tangent. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >