解析php中call_user_func_array的作用
一、直接调用方法
复制代码 代码如下:
function test($a, $b)
{
echo '测试一:'.$a.$b;
}
//调用test方法,array("asp", 'php')对应相应的参数
call_user_func_array('test', array("asp", 'php'));
二、通过类调用类中的方法
复制代码 代码如下:
class test2{
function phpSay($a, $b)
{
echo '测试二:'.$a.$b;
}
}
$o = new test2();
//相当于:$o->phpSay('php','你好');
call_user_func_array(array(&$o, 'phpSay'), array('php','你好'));

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft