网眼 2009-03-18 23:26:38 回复 置顶 修改 删除
1. Choose the selection that best matches the following statements:
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!
过一段时间会公布答案。