php -r "$aa=array('hh'=>null);echo (isset($aa)?'OK':'NG');"
OK
php -r "$aa=array('hh'=>false);echo (isset($aa['hh'])?'OK':'NG');"
OK
php -r "$aa=array('hh'=>null);echo (isset($aa['hh'])?'OK':'NG');"
NG
php -r "$aa=array('hh'=>null);echo (isset($aa['bb'])?'OK':'NG');"
NG
php -r "$aa=array('hh'=>'');echo (isset($aa['hh'])?'OK':'NG');"
OK
php -r "$aa=array('hh'=>0);echo (isset($aa['hh'])?'OK':'NG');"
OK
php -r "$aa=array('hh'=>0);echo ($aa['hh']?'OK':'NG');"
NG
php -r "$aa=array('hh'=>null);echo ($aa['hh']?'OK':'NG');"
NG
php -r "$aa=array('hh'=>false);echo ($aa['hh']?'OK':'NG');"
NG
php -r "$aa=array('hh'=>'');echo ($aa['hh']?'OK':'NG');"
NG
php -r "$aa=array('hh'=>1);echo ($aa['hh']?'OK':'NG');"
OK
0 件のコメント:
コメントを投稿