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 sc...@paragonie.com: 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

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

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 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

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 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

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 r...@fedoraproject.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 See https://bugs.php.net/bug.php?id=70112 As this a very small

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 r...@fedoraproject.org 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

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

2015-07-23 Thread Scott Arciszewski
On Wed, Jul 22, 2015 at 8:09 AM, flaupre...@free.fr wrote: Hi, De: Remi Collet r...@fedoraproject.org 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

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 poll...@php.net wrote: On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet r...@fedoraproject.org wrote: See https://bugs.php.net/bug.php?id=70112 I'm not inherently against it, but this really

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 internals@lists.php.net Subject: Re: [PHP-DEV] RFE to allow dirname($foo, 2) Le 22/07/2015 20:57, Marco Pivetta a écrit : On 22 July 2015 at 19:49

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

2015-07-22 Thread Marco Pivetta
On 22 July 2015 at 19:49, Sara Golemon poll...@php.net wrote: On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet r...@fedoraproject.org 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

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 r...@fedoraproject.org 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 =

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

2015-07-22 Thread flaupretre
Hi, De: Remi Collet r...@fedoraproject.org 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

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 poll...@php.net mailto:poll...@php.net wrote: On Wed, Jul 22, 2015 at 4:55 AM, Remi Collet r...@fedoraproject.org mailto:r...@fedoraproject.org wrote: See https://bugs.php.net/bug.php?id=70112 I'm not