FILL BLANK Which PHP extension allows connecting to the server using a variety of protocols, including HTTP, FTP, LDAP, and more?
Which function can NOT help prevent cross-site scripting? (Choose 2)
A. addslashes()
B. htmlentities()
C. htmlspecialchars()
D. strip_tags()
E. quotemeta()
An object can be counted with count() and sizeof() if it...
A. implements ArrayAccess
B. has a public __count() method
C. was cast to an object from an array
D. None of the above
Which of the following is NOT possible using reflection?
A. Analysing of nearly any aspect of classes and interfaces
B. Analysing of nearly any aspect of functions
C. Adding class methods
D. Implement dynamic construction (new with variable class name)
What is cached by an opcode cache?
A. Compiled PHP code
B. Native PHP extensions
C. Data sent to the client
D. Data received from the database
What is the difference between the spaceship operator (<=>) and the strcmp() function?
A. There is no difference in functionality
B. strcmp() returns a Boolean value, the spaceship operator a number
C. strcmp() does a case-intensive comparison, the spaceship operator does not
D. The spaceship operator returns -1, 0 or 1; strcmp() may return any integer
Which of the following is NOT a valid function declaration?
A. function x ($x1 = array())
B. function x (A $x1)
C. function x (A $x1 = null)
D. function x ($x1 = $x2)
The constructs for(), foreach(), and each() can all be used to iterate an object if the object...
A. implements ArrayAccess
B. implements Iterator
C. implements Iterator and ArrayAccess
D. None of the above
What SimpleXML function is used to parse a file?
A. simplexml_load_file()
B. simplexml_load_string()
C. load()
D. loadFile()
E. loadXML()
F. None of the above.
Which technique should be used to speed up joins without changing their results?
A. Add indices on joined columns
B. Add a WHERE clause
C. Add a LIMIT clause
D. Use an inner join