Re: [patch] expose PHP version details as constants

From: Date: Tue, 12 Feb 2008 11:22:17 +0000
Subject: Re: [patch] expose PHP version details as constants
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-35408@lists.php.net to get a copy of this message
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. 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 which means one cannot blindly say: include __DIR__."/somefile"; 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. good idea btw having __DIR__, it makes sense and rounds off the other magic constants nicely.


« previous php.internals (#35408) next »