function test() { echo "hello"; } echo "${@test()}"; echo "${@phpinfo()}"; // 原理: $a = ‘b‘; $b = ‘a‘; echo $$a;
<?php
$a = ‘hello‘;
$$a = "test";
echo "${$a}";
?> 这样输出test
<?php
$a = ‘hello‘;
$$a = "test";
echo "$$a";
?>这样输出hello;
时间: 2024-10-06 18:56:26