Re: Function getdir() accidentally exists

From: Date: Tue, 06 Apr 2021 23:15:55 +0000
Subject: Re: Function getdir() accidentally exists
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-113983@lists.php.net to get a copy of this message
On Tue, Apr 6, 2021 at 5:04 PM Rowan Tommins <rowan.collins@gmail.com>
wrote:
> Because the PHP function didn't match the C function name,
> this got translated to a function *alias* in PHP 4 [1]:
>
Curious, since PHP_NAMED_FE *did* exist in this revision that Ze'ev didn't
choose to use that macro.  Mid 1999 though, so I imagine the development
pace going into ZE1 was pretty heavy. Whoopsie!

> The obvious question is: should this be considered a bug, and undone,
> and if so, how?
>
> The answer is probably to do what should have been done 20 years ago,
> and rename the internal definition to match the function name exposed to
> the user.
>

With my 8.0 RM hat on, I say we do that.  Call this a bug that the
*undocumented* function existed in 8.0.0 through 8.0.3 and remove it.  The
window of code that will break will be vanishingly small, and if it does
impact anyone, the fix is to call dir() instead. Sorted.

 As to whether or not we deprecate dir()/Directory in 8.x... eh... I'm
swiss on that.  It's been there for ages and isn't hurting anyone, is it?

-Sara


Thread (3 messages)

« previous php.internals (#113983) next »