{"id":812,"date":"2017-03-30T09:37:08","date_gmt":"2017-03-30T17:37:08","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=812"},"modified":"2017-03-30T09:37:08","modified_gmt":"2017-03-30T17:37:08","slug":"php-call_user_func-vs-just-calling-function","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=812","title":{"rendered":"PHP call_user_func vs just calling function"},"content":{"rendered":"<p>Always use the actual function name when you know it.<\/p>\n<p>call_user_func is for calling functions whose name you don&#8217;t know ahead of time but it is much less efficient since the program has to lookup the function at runtime.  Also useful if you don&#8217;t know how many arguments you are passing. call_user_func calls functions with a series of individual parameters. <\/p>\n<p>call_user_func_array  calls functions with array of parameters. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Always use the actual function name when you know it. call_user_func is for calling functions whose name you don&#8217;t know ahead of time but it is much less efficient since the program has to lookup the function at runtime. Also useful if you don&#8217;t know how many arguments you are passing. call_user_func calls functions with &hellip; <a href=\"http:\/\/www.tech.dimprash.com\/?p=812\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PHP call_user_func vs just calling function<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-812","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=812"}],"version-history":[{"count":1,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/812\/revisions"}],"predecessor-version":[{"id":813,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/812\/revisions\/813"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=812"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}