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

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

java - Callback from new thread to class from which thread was initiated -