Hi,

Am 25.07.2015 um 19:42 schrieb Scott Arciszewski:
> 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?
> 
> 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';

I am not going to discuss personal preferences, but for me the first is.
You require to go four Levels up and include something, that should just
not be necessary with proper autoloading.

Greets,
Dennis

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

Reply via email to