http://docs.php.net/manual/zh/language.types.null.php问题:
1.<?php
if ($x)
echo "1";
else
echo "0";
?>
ubuntu@ubuntu:~$ php /var/www/b.php
PHP Notice: Undefined variable: x in /var/www/b.php on line 3上面代码,第3行错了!PHP语法,变量可以不赋值。
如果,变量不赋值,其值是:NULL。对么?
为什么编译,第3行出错呢?
1.<?php
if ($x)
echo "1";
else
echo "0";
?>
ubuntu@ubuntu:~$ php /var/www/b.php
PHP Notice: Undefined variable: x in /var/www/b.php on line 3上面代码,第3行错了!PHP语法,变量可以不赋值。
如果,变量不赋值,其值是:NULL。对么?
为什么编译,第3行出错呢?
那么,其值是:NULL。布尔型NULL,是false。
对么?
ubuntu12.04 LTS,终端调试有错误!
程序中 error_reporting(E_ALL ^ E_NOTICE);
php.ini 中 error_reporting=E_ALL ^ E_NOTICE
这少要有一个
PHP官方手册(中文),哪有这些说明?
给个链接!
现在版本,对这类要报notice的。