On Sat, Jul 25, 2015 at 10:11 AM, Dennis Birkholz <den...@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>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to