Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35411 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6393 invoked by uid 1010); 12 Feb 2008 12:02:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6378 invoked from network); 12 Feb 2008 12:02:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2008 12:02:31 -0000 Authentication-Results: pb1.pair.com header.from=jochem@iamjochem.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jochem@iamjochem.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain iamjochem.com from 194.109.193.121 cause and error) X-PHP-List-Original-Sender: jochem@iamjochem.com X-Host-Fingerprint: 194.109.193.121 mx1.moulin.nl Linux 2.6 Received: from [194.109.193.121] ([194.109.193.121:49437] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 29/19-36990-6DA81B74 for ; Tue, 12 Feb 2008 07:02:30 -0500 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id BBBDA27E01D; Tue, 12 Feb 2008 13:02:26 +0100 (CET) X-Virus-Scanned: amavisd-new at moulin.nl Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (mx1.moulin.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id peaymraWOjAJ; Tue, 12 Feb 2008 13:02:23 +0100 (CET) Received: from [192.168.1.10] (bspr.xs4all.nl [194.109.161.228]) by mx1.moulin.nl (Postfix) with ESMTP id E4A1227DDD5; Tue, 12 Feb 2008 13:02:22 +0100 (CET) Message-ID: <47B18AAC.4090409@iamjochem.com> Date: Tue, 12 Feb 2008 13:01:48 +0100 User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Pierre Joye CC: Sebastian Bergmann , internals@lists.php.net References: <1202747101.3698.14.camel@localhost> <1202748940.3698.25.camel@localhost> <47B17CD6.5080004@iamjochem.com> <47B18169.4090108@iamjochem.com> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [patch] expose PHP version details as constants From: jochem@iamjochem.com (Jochem Maas) Pierre Joye schreef: > Hi Jochen, > > On Feb 12, 2008 12:22 PM, Jochem Maas wrote: >> Sebastian Bergmann schreef: >>> Jochem Maas schrieb: >>>>>> Output: >>>>>> C:\ >>>>>> Is this intended? >>>>> Yes, or what would you expect? >>>> possibly 'C:' ? >>> Is "C:" not the volume whereas "C:\" is the root directory on the >>> volume? >> this is what I thought, kind of, but I was just proposing what the OP >> was expecting. > > the OP? > >> it does make one think a little about the small discrepancy with regard to >> whether the slash is 'appended' or not depending on whether the dir is >> the root or not: >> >> php -r ' echo dirname("/Users"),"\n", dirname("/Users/foo"),"\n"; ' >> >> / >> /Users > > You ask the directory name of a path. In the first case, you ask the > directory name of the path /Users (or /Users/), it is "/". The > directory name of the path "/Users/foo" is "/Users". Everything works > as expected as far as I can see. I agree, I was merely pondering out loud, no problems as such. > > >> which means one cannot blindly say: >> >> include __DIR__."/somefile"; > > Little notice: OSes without volumes will work smoothly. For those with > volumes (windows, novell afair) willl use the current volume. > >> although that's probably moot because my experience is that extraneous slashes >> in a path are, afaik, always ignored. i.e. /foo//foo//foo == /foo/foo/foo, >> so really there is nothing to see here. > > Yes, PHP is very tolerant (and brought us some headaches too in the > pasts :). It is also tolerant with \ or / usages. I can imagine it has caused headaches for dev's working with the underlying implementation .. I for one am grateful it's so tolerant ... more than once have I noticed some badly defined paths working without a problem, months after the code was originally written. 3 cheers for tolerance :-) > > Cheers,