Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-26 Thread Jakub Kubíček
Hi Scott! 2015-07-25 19:42 GMT+02:00 Scott Arciszewski : > 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'; That's on everyone's own, but for me it's the first. However,

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-25 Thread Dennis Birkholz
Hi, Am 25.07.2015 um 19:42 schrieb Scott Arciszewski: > On Sat, Jul 25, 2015 at 10:11 AM, Dennis Birkholz 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

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-25 Thread Scott Arciszewski
On Sat, Jul 25, 2015 at 10:11 AM, Dennis Birkholz 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

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-25 Thread Dennis Birkholz
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 > r

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-24 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 24/07/2015 02:11, Hannes Magnusson a écrit : > On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet > wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> See https://bugs.php.net/bug.php?id=70112 >> >> >> As this a very small self-contained ch

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-23 Thread Scott Arciszewski
On Wed, Jul 22, 2015 at 8:09 AM, wrote: > Hi, > >> De: "Remi Collet" >> >> See https://bugs.php.net/bug.php?id=70112 >> >> As this a very small self-contained change, I don't think it needs a RFE. > > +1 for the feature, but not sure it can go to 7.0. > > Regards > > François > > -- > PHP Intern

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-23 Thread Hannes Magnusson
On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > See https://bugs.php.net/bug.php?id=70112 > > > As this a very small self-contained change, > I don't think it needs a RFE. > > Feedback welcome Shouldn't you check if you are at the root

RE: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-23 Thread Anatol Belski
Hi, > -Original Message- > From: Remi Collet [mailto:r...@fedoraproject.org] > Sent: Thursday, July 23, 2015 7:29 AM > To: PHP Internals > Subject: Re: [PHP-DEV] RFE to allow dirname($foo, 2) > > Le 22/07/2015 20:57, Marco Pivetta a écrit : > > On 22 July

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-23 Thread Josh Di Fabio
Great suggestion, Remi, I'd love to see this change! On Wed, Jul 22, 2015 at 7:49 PM, Sara Golemon wrote: > > On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet wrote: > > See https://bugs.php.net/bug.php?id=70112 > > > I'm not inherently against it, but this really really sounds like a > job for a us

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-22 Thread Remi Collet
Le 22/07/2015 20:57, Marco Pivetta a écrit : > On 22 July 2015 at 19:49, Sara Golemon > wrote: > > On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet > mailto:r...@fedoraproject.org>> wrote: >> See https://bugs.php.net/bug.php?id=70112 >> > I'm not inherently against it, but th

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-22 Thread Marco Pivetta
On 22 July 2015 at 19:49, Sara Golemon wrote: > On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet > wrote: > > See https://bugs.php.net/bug.php?id=70112 > > > I'm not inherently against it, but this really really sounds like a > job for a userspace function. > > function dirname_n($path, $n) { > wh

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-22 Thread Sara Golemon
On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet wrote: > See https://bugs.php.net/bug.php?id=70112 > I'm not inherently against it, but this really really sounds like a job for a userspace function. function dirname_n($path, $n) { while (($path !== '.') && $n--) $path = dirname($path); return $p

Re: [PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-22 Thread flaupretre
Hi, > De: "Remi Collet" > > See https://bugs.php.net/bug.php?id=70112 > > As this a very small self-contained change, I don't think it needs a RFE. +1 for the feature, but not sure it can go to 7.0. Regards François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit

[PHP-DEV] RFE to allow dirname($foo, 2)

2015-07-22 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 See https://bugs.php.net/bug.php?id=70112 As this a very small self-contained change, I don't think it needs a RFE. Feedback welcome Remi. -BEGIN PGP SIGNATURE- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.