mixed call_user_func ( callback $function [, mixed $parameter [, mixed $...]] ) mixed call_user_func_array ( callback $function, array $param_arr ) <?phpfunction barber($type){ echo "You wanted a $type haircut, no problem";}call_user_func(‘barber‘, "mushroom");call_user_func(‘barber‘, "shave");?> -----------------或者你可以这样 <?php function fuck(){ echo ‘fuck‘;} $a = ‘fuck‘;$a();--------------------------全面的写法
<?php
class test extends testBase{
function name()
{
echo ‘name namenamenamename11111111 ‘;
}
function pass()
{
echo ‘passpasspasspasspasspass22222222222 ‘;
}
}
class testBase{
function __construct()
{
$test_func=$_GET[‘st‘];
$this->$test_func();
}
}
new test();
时间: 2024-11-03 00:03:16