星期一, 11月 08, 2010

The Zend PHP Certification Practice Test Book

Ch1.PHP Programming Basics
  • 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

    Result: B
    Looking at the answers, the only one that makes sense for every blank is B. PHP is a
    scripting language based on the Zend Engine that is usually embedded in HTML code. As
    such, it is primarily used to develop HTML documents, although it can be used just as nicely to develop other types of documents, such as XML.
  • 16.Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
    A.When the parameter is Boolean
    B.When the function is being declared as a member of a class
    C.When the parameter is being declared as passed by reference
    D.When the function contains only one parameter
    E.Never

    Answer:
    When a parameter is declared as being passed by reference you cannot specify a default
    value for it, since the interpreter will expect a variable that can be modified from within the
    function itself. Therefore, Answer C is correct.
  • 17.The ____ operator returns True if either of its operands can be evaluated as True, but not both.
    Answer: xor
    用法$result = ($A xor $B);
  • 19. Which of the following expressions multiply the value of the integer variable $a by 4?
    (Choose 2)
    $a *= pow (2, 2);
    $a >>= 2;
    $a <<= 2; $a += $a + $a; None of the above Result: A,C 嗯 是往左... 我怎麼會想成往右...



Ch2.
1,2,3,6,8,9,12,13,14,17,18

沒有留言: