第六章单元测试
- <?php
$A = "PHPlinux";
$B = "PHPLinux";
$C = strstr($A,"L");
$D = stristr($B,"l");
echo $C ." is ".$D;
?>
以下代码运行结果为( )。 - 下列哪个函数是将数组转换为字符串?( )
- <?php
$first = "This course is very easy !";
$second = explode(" ",$first);
$first = implode(",", $second);
echo $first;
?>
以下代码运行的结果为( )。 - <?php
$email='gaofeng@lampbrother.com.cn';
$str = ____($email, '@');
$info = ____('.',$str);
____($info);
?>
输出结果为:Array ([0] => @lampbrother [1]=>com[2]=>cn)
以上程序横线处应该使用的函数为( )。 - PHP中,下列哪个函数是将字符串前后颠倒?( )
- <?php
$text = " \tllo ";
echo strlen(trim($text));
?>
以上字符的长度是( )。 - 将字符串中所有英文单字的开头字母转换为大写的函数应该是( )。
- 在PHP中,'+'操作符的功能不包括( )。
- 下列PHP函数中不能直接在页面输出字符串的函数是( )。
A:PHP is Linux B:PHP is
C:is Linux D:PHP is inux
答案:is Linux
A:imploed()
B:explode()
C:natsort()
D:arsort()
A:This course is very easy !
B:提示错误
C:This course is very easy !,
D:This,course,is,very,easy,!
A:strchr, split, var,_dump
B:strchr, split, var_dump
C:strstr,explode, echo
D:strstr, explode, print_r
A:strfirst()
B:strrpos()
C:strstr()
D:strrev()
A:9
B:5
C:7
D:3
A:ucwords()
B:strtolower()
C:strtoupper()
D:ucfirst()
A:类型自动转换
B:变量数据相加
C:数组数据合并
D:字符串连接
A:print
B:echo
C:sprintf
D:printf
温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!