Re: Re: [RFC] [DISCUSSION] Consistent Function Names

From: Date: Sun, 08 Mar 2015 01:25:16 +0000
Subject: Re: Re: [RFC] [DISCUSSION] Consistent Function Names
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-84422@lists.php.net to get a copy of this message
Hi Rowan, On Sun, Mar 8, 2015 at 8:31 AM, Rowan Collins <rowan.collins@gmail.com> wrote: > What? That's not the same thing at all. I'm pretty sure those functions > are deprecated *because* we have array callback forms, so you can use > call_user_func to call a method. > > PHP has a well-defined definition of "callable", as used by is_callable() > and function parameter typehints, and literally everywhere that wants a > callback. Since there's no such thing as a function or method pointer, that > definition includes a string identifying a plain function, and two array > forms, [string, string] and [object, string], representing static and > instance methods, respectively. You can't not accept those forms as a > callback parameter in one particular function just to make things tidier. > I should have written "Let deprecate _all_ array callbacks" by document and raise deprecate error in PHP7. Remove array callbacks in PHP 8. Makes sense? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#84422) next »