php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #71697 Shouldn't call_user_func() be named call()?
Submitted: 2016-03-01 15:46 UTC Modified: 2016-03-01 22:28 UTC
From: kak dot serpom dot po dot yaitsam at gmail dot com Assigned:
Status: Wont fix Package: *General Issues
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kak dot serpom dot po dot yaitsam at gmail dot com
New email:
PHP Version: OS:

 

 [2016-03-01 15:46 UTC] kak dot serpom dot po dot yaitsam at gmail dot com
Description:
------------
Summary will do.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-03-01 22:12 UTC] requinix@php.net
-Status: Open +Status: Wont fix
 [2016-03-01 22:12 UTC] 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 22:14 UTC] kak dot serpom dot po dot yaitsam at gmail dot com
Why not make an alias?
 [2016-03-01 22:17 UTC] 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:28 UTC] kak dot serpom dot po dot yaitsam at gmail dot com
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().
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 15:01:29 2024 UTC