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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -