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

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -