You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
448 B

<?php
function func_a(){
echo "func_a<br>";
}
function func_b($str='')
{
echo $str.'<bt>';
}
function func_c($string)
{
echo $string;
}
$funcname='func_a';
$funcname(); //变量()就是可变函数,会执行与funcname命名相同的函数执行;
$funcname='func_b';
$funcname('this is func_b<br>');
$funcname='func_c';
$funcname('this is func_c <br>');
?>