+ -
当前位置:首页 → 问答吧 → 测试你的PHP水平

测试你的PHP水平

时间:2011-11-24

来源:互联网

http://www.blueshoes.org/en/developer/syntax_exam/
1.
$array = array();
$x = (bool)$array;
$x = FALSE;

2.
$x = (bool)($empty == $null);
$x = TRUE;

$x = (bool)($empty == $notSet);
$x = TRUE;

3
$x = (bool)("0");
$x is FALSE;

4.
$x = (bool)("hello" == "true");
$x is FALSE;

5.
$x = (bool)("hello" == TRUE);
$x is TRUE;
6
$a = 'foo';
$b = isSet($a['bar']);
$b is TRUE;

$a = 'foo';
$b = empty($a['bar']);
$b is TRUE;

7.
$a = array('foo'=>'foo');
$b = isSet($a['bar']);
$b is FALSE;

作者: systemerror   发布时间: 2011-11-24

沙发沙发

作者: wglzaj   发布时间: 2011-12-28

热门下载

更多