常见类型,isset(),empty()判断

<?php

$a = NULL;

var_dump($a);                  //NULL,【false】,true

var_dump(isset($a));

var_dump(empty($a));

echo "<br>";

$b = 0;

var_dump($b);                  //int(0),true,true

var_dump(isset($b));

var_dump(empty($b));

echo "<br>";

$c = '0';

var_dump($c);                 //string(0),true,true

var_dump(isset($c));

var_dump(empty($c));

echo "<br>";

$d = '';

var_dump($d);                 //string(''),true,true

var_dump(isset($d));

var_dump(empty($d));

echo "<br>";

$e = array();

var_dump($e);                //array(),true,true

var_dump(isset($e));

var_dump(empty($e));

echo "<br>";

var_dump($f);                //NULL,false,true

var_dump(isset($f));

var_dump(empty($f));

echo "<br>";

$g = "g";

unset($g);

var_dump($g);               //NULL,false,true

var_dump(isset($g));

var_dump(empty($g));

<?php

$h=NULL;

var_dump($h === $i);         //true

上一篇:[matlab] 6.粒子群优化算法


下一篇:ompparticles.cpp:(.text+0x322): undefined reference to `omp_set_num_threads'