原创作者: richyang   阅读:1168次   评论:1条   更新时间:2011-05-26    

这些题目无意之中在一个网站上找到,先做做看,你能对几道?过几天再把答案公布出来!

 

PHP Skills Test

 

$a .= "a";
$a .= "b";
$a .= "c";

What is the value of $a ?

 

$a = 4;
for ($b = 0; $b <= $a; $b++) {
$c++;
}

What is the value of $c ?

 

$a[] = "a";
$a[] = "b";
$a[] = "c";

What is the value of $a[2] ?

 

$a = 200.5;
$b = 2005;
$c = "2005";

Which of the above variables's type is integrer ?
$

 

$a = '1';
$b = &$a;
$b = "2$a";

What is the value of $a ?

 

$a = "abc";
$b = substr($a, 0, -1);

What is the value of $b ?

 

$a = true;
$b = "true";
$c[] = "true";

Which of the above variables's type is string ?
$

 

$a = "b";
$b = "a";

What is the value of ${$b} ?

 

$a = array("a","b","c");
foreach ($a as $b){
$c++;
}

What is the value of $c ?

 

$a = "0";
$b = "0";
if ($a != "1" && $b == "1" || $a != "0" || $b != "1" ){
$d = "0";
}else{
$d = "1";
}

What is the value of $d ?

 

$a = "post_processed_string";
$b = array("post_", "_");
$c = array("", " ");
$d = ucwords(str_replace($b,$c,$a));

What is the value of $d ?

 

$a = "<tt>some</tt><b>html</b>";
preg_match("/<\w?>(\w*?)<\/\w?>/",$a,$b);

What is the value of $b[1] ?

评论 共 1 条 请登录后发表评论
1 楼 hnzhoujunmei 2010-11-14 16:32
有答案否?

发表评论

您还没有登录,请您登录后再发表评论

文章信息

Global site tag (gtag.js) - Google Analytics