Req #71697 [Wfx]: Shouldn't call_user_func() be named call()?

From: Date: Tue, 01 Mar 2016 22:28:27 +0000
Subject: Req #71697 [Wfx]: Shouldn't call_user_func() be named call()?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199553@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71697&edit=1 ID: 71697 User updated by: kak dot serpom dot po dot yaitsam at gmail dot com Reported by: kak dot serpom dot po dot yaitsam at gmail dot com Summary: Shouldn't call_user_func() be named call()? Status: Wont fix Type: Feature/Change Request Package: *General Issues PHP Version: Irrelevant Block user comment: N Private report: N New Comment: There's a difference: call_user_func() doesn't raise Fatal Error if the argument is not callable. In PHP 7 these errors are catchable, though. So yeah, I should just switch to PHP 7 and $func(). Previous Comments: ------------------------------------------------------------------------ [2016-03-01 22:17:55] nikic@php.net To add to that, you oughtn't be using call_user_func() at all and instead just use the normal $func() syntax. The only reason to use call_user_func() is backwards compatibility, so an alias would be utterly pointless. ------------------------------------------------------------------------ [2016-03-01 22:14:29] kak dot serpom dot po dot yaitsam at gmail dot com Why not make an alias? ------------------------------------------------------------------------ [2016-03-01 22:12:21] requinix@php.net It's not just for user functions, true, but it's a bit late to change its name now. ------------------------------------------------------------------------ [2016-03-01 15:46:22] kak dot serpom dot po dot yaitsam at gmail dot com Description: ------------ Summary will do. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71697&edit=1

« previous php.bugs (#199553) next »