Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35409 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92076 invoked by uid 1010); 12 Feb 2008 11:34:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92061 invoked from network); 12 Feb 2008 11:34:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2008 11:34:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.184 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.184 rv-out-0910.google.com Received: from [209.85.198.184] ([209.85.198.184:49849] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/07-36990-92481B74 for ; Tue, 12 Feb 2008 06:34:03 -0500 Received: by rv-out-0910.google.com with SMTP id k15so3542615rvb.23 for ; Tue, 12 Feb 2008 03:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=HN3eOUz7o8EkX1bkbg6TCNL7nkwgQY9B3Wqpj9OXyeA=; b=rgGvsmucm0/xVye69+GpWGvTLf6wjoGme/X5DWrsWtW8H0pRM0X+k6GDfU2V+AXjE3Y5rZ6Fb2JZoRHzuxXCG8Ipdiz2Lav2xRReCT/jSz2qSEIUr5qQwVGl4ZXCveuHEZLLcE77dfowOT/a3UyUSSbKyqBOpGhqYDzZSZtLIAw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jh5lDXXUiX9m9QF9Ra1gp+5aa7mtAS2Xvt5DRPi/lGsmO8nEZcmRoTtZrHy/mn1Gzp6KMkRLIbwpPt/uS1cjZ27sWN18HWpH/AsQB7dr0HaRmxFsgYcoxDqW7bv99tVXe7F+i/yViqukkfODbC/lZNNbgo65c0+jkLkojfjLJeA= Received: by 10.140.192.9 with SMTP id p9mr837452rvf.103.1202816037375; Tue, 12 Feb 2008 03:33:57 -0800 (PST) Received: by 10.141.70.21 with HTTP; Tue, 12 Feb 2008 03:33:57 -0800 (PST) Message-ID: Date: Tue, 12 Feb 2008 12:33:57 +0100 To: "Jochem Maas" Cc: "Sebastian Bergmann" , internals@lists.php.net In-Reply-To: <47B18169.4090108@iamjochem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1202747101.3698.14.camel@localhost> <1202748940.3698.25.camel@localhost> <47B17CD6.5080004@iamjochem.com> <47B18169.4090108@iamjochem.com> Subject: Re: [PHP-DEV] [patch] expose PHP version details as constants From: pierre.php@gmail.com ("Pierre Joye") 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. > 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. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org