《
PHP 程序设计》复习题
16.进制转换函数 decbin()10 转 2、decoct()10 转 8 、 hexdec()16 转 10
、
bindec2
转
10()
17. \n:、 \t 、\r 、\$、\\四个转义字符的含义
18. is_long()、is_double()、is_array()判断是否数组、is_object()
判断是否对象 四个函数
的作用
19. $a=5;$b=6;
function Sum()
{
Global $a,$b;
$b=$a+++$b;
加了再自增
}
Sum();
echo $a,$b; $a,$b 的结果为(
)
20. A、in_array() 检查数组中是否存在某个值
B、
array_key_exists() 判断数组键是否存在于某个函数中
C、
array_keys()返回数组中所有的键名
D、
array_values()返回数组中所有的值
21.
A、copy()
bool copy ( string $source , string $dest )
将文件从
source
拷贝到
dest
。成功时返回
TRUE
, 或者在失败时返回
FALSE
B、
unlink()
bool unlink ( string $filename )
删除
filename
。和
Unix C
的
unlink()
函数相似。成功时返回
TRUE
, 或者在
失败时返回
FALSE.
C、
rename()
bool rename ( string $oldname , string $newname [, resource
$context ] )
尝试把
oldname
重命名为
newname
。
成功时返回
TRUE
, 或者在失败时返回
FALSE.
D、
fwrite()
写文件
22.
下面那一项不能被加入到 user 数组中(
)
A、
$users[] = ‘john’; B、array_add($users,’john’);
C、
array_push($users,‘john’); D、$users ||= ‘john’;