PHP 基础测试题(1~5)

网眼 2009-03-18 23:26:38 回复 置顶 修改 删除
1. Choose the selection that best matches the following statements:
PHP is a _____ scripting language based on the ____ engine. It is primarily used to
develop dynamic _____ content, although it can be used to generate ____ documents
(among others) as well.
A.Dynamic, PHP, Database, HTML
B.Embedded, Zend, HTML, XML
C.Perl-based, PHP, Web, Static
D.Embedded, Zend, Docbook, MySQL
E.Zend-based, PHP, Image, HTML
2. Which of the following tags is not a valid way to begin and end a PHP code block?
<% %>
<? ?>
<?= ?>
<! !>
<?php ?>
3. Which of the following is not valid PHP code?
$_10
${“MyVar”}
&$something
$10_somethings
$aVaR
4. What is displayed when the following script is executed?
<?php
define(myvalue, "10");
$myarray[10] = "Dog";
$myarray[] = "Human";
$myarray['myvalue'] = "Cat";
$myarray["Dog"] = "Cat";
print "The value is: ";
print $myarray[myvalue]."/n";
?>
A.The value is: Dog
B.The value is: Cat
C.The value is: Human
D.The value is: 10
E.Dog
5. What is the difference between print() and echo()?
A.print() can be used as part of an expression, while echo() can’t
B.echo() can be used as part of an expression, while print() can’t
C.echo() can be used in the CLI version of PHP, while print() can’t
D.print() can be used in the CLI version of PHP, while echo() can’t
E.There’s no difference: both functions print out some text!
 
过一段时间会公布答案。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值