Re: RFE to allow dirname($foo, 2)

From: Date: Sat, 25 Jul 2015 17:42:11 +0000
Subject: Re: RFE to allow dirname($foo, 2)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-87292@lists.php.net to get a copy of this message
On Sat, Jul 25, 2015 at 10:11 AM, Dennis Birkholz <dennis@birkholz.biz> wrote: > Hi, > > Am 23.07.2015 um 11:54 schrieb Josh Di Fabio: >> Now, most often, dirname(... dirname(__DIR__) ...) is used in application entry >> points during the bootstrapping process. In my experience, it's most commonly >> used in order to include an autoloader or some bootstrap file which itself is >> responsible for including the autoloader. > > doesn't work __DIR__.'/../../' on Windows also? Why do you need > dirname() here? > > Greets > Dennis > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > What's easier to read and less likely to result in bugs? require_once __DIR__ . '/../../../../autoload.php'; or require_once dirname(__FILE__, 5) . '/autoload.php'; Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises <https://paragonie.com>

« previous php.internals (#87292) next »