PHP- What is the best way to pass NULL to a function? -
i have function trying pass null value to:
function test($this=null, $that=null) { if ($this) { // } if ($that) { // else } }
so, if trying pass value $that
, can do:
$that = 100; this('',$that);
but ''
best way pass null function?
use null
:
$that = 100; test(null,$that);
Comments
Post a Comment