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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -