我有一个函数试图将 NULL 值传递给:
function test($this=null, $that=null) {
if ($this) {
// Do something
}
if ($that) {
// Do something else
}
}
Run Code Online (Sandbox Code Playgroud)
因此,如果我尝试仅为 传递值$that,我可以这样做:
$that = 100;
this('',$that);
Run Code Online (Sandbox Code Playgroud)
但是''将 NULL 传递给函数的最佳方法是什么呢?
| 归档时间: |
|
| 查看次数: |
4603 次 |
| 最近记录: |