第四章 函数使用:函数使用4.1函数定义与参数传递:1、函数定义与参数传递
4.2函数的调用:2、函数调用
4.3其他函数:3、其他函数
4.1函数定义与参数传递:1、函数定义与参数传递
4.2函数的调用:2、函数调用
4.3其他函数:3、其他函数
[单选题]<?php
$a = "Hello";
function print_a() {
$a = "php mysql !!";
global $a;
echo $a;
}
echo $a;
print_a();
?>
以上代码执行结果为( )。

选项:[Hello Hello
, php mysql !!
, Hello
, Hello php mysql !!
]
[单选题] <?php
$num = 10;
function demo($number) {
$number = $number+20
}
demo(&$num);
echo $num,"n";
?>
执行完以上代码后,变量$num的值为( )。

选项:[10
, 显示错误
, 30
, 20
]
[单选题] <?php
$a = "hello";
function print_a() {
global $a;
$a = "phper";
}
echo $a;
?>
以上代码执行结果为( )。

选项:[错误
, phper
, hellophper
, hello
]
[单选题] <?php
function total_Sum($c=5, $b=3,$a){
echo $a."+ ".$b." + ".$c." = ".($a+$b+$c) ;
}
total_Sum(1);
?>
以上程序运行结果为( )。

选项:[提示错误,并有显示:+3+1 = 4
, 5+3+1=9
, 9
, 1+5+3 =9
]
[单选题] return ? == 'A';
上面代码加入下面那个函数后返回TRUE:( )。

选项:[''+65
, chr(65), 65+'', 、ord(65)]
[单选题] <?php
$str = 'hello你好世界';
echo strlen($str);
?>
PHP程序使用utf-8编码,以下程序输出结果是( )。

选项:[18
, 9
, 13
, 17
]
[单选题]下列那个选项是正确的引用文件的方法( )。

选项:[require和function
, define和include
, require和include
, function和include
]

温馨提示支付 ¥1.00 元后可查看付费内容,请先翻页预览!
点赞(0) dxwkbang
返回
顶部