php中empty和isset的区别

比如:
  $_POST
[ 'test']= ' ';
那么:
  
  isset($_POST[ 'test'])  ===>   true;
  empty($_POST[ 'test'])  ===>   true;

如果把POST变量unset:
   unset($_POST[ 'test']);
那么:
  
  isset($_POST[ 'test'])   ===>   false;
  empty($_POST[ 'test'])   ===>   true;


  

原文地址:https://www.cnblogs.com/gaohj/p/3267689.html