php - PHP - 将变量设置为等于函数,而不运行它
问题描述
您知道是否有一种方法可以在不执行函数的情况下在 php 中执行以下操作?
我希望 $test 等于函数,而不是它的结果。
$test = helloWorld();
function helloWorld() {
echo "HelloWorld";
}
解决方案
推荐阅读
- amazon-dynamodb - 我应该在单个 DynamoDB 表中保留多少项目是否存在最佳实践限制?
- reactjs - 从一个模块移动到另一个模块时 Redux 状态丢失
- python - 尝试实现 python 微调器,但此代码在完成之前不会打印任何内容
- spring-boot - SpringBoot/RedisConnectionFactoy -class not found 异常
- google-sheets-formula - Google Sheet ImportXml 将数字的值转换错误
- android - 项目可以打开但现在不能运行
- python - 对于数据框列,如何将所有非正常值替换为“NaN”
- kernel - 项目的系统调用实现
- docker - 每个图像限制一个容器
- android - 如何在片段中隐藏工具栏并保留状态栏颜色?