What is the output of the following code?
220.2231
22.2231
22.2,231
56.2
Which of the following functions are used to escape data within the context of HTML? (Choose two.)
htmlentities()
addslashes()
stripslashes()
strip_tags()
htmlspecialchars()
What is the difference between the spaceship operator (<=>) and the strcmp() function?
There is no difference in functionality
strcmp() returns a Boolean value, the spaceship operator a number
strcmp() does a case-intensive comparison, the spaceship operator does not
The spaceship operator returns -1, 0 or 1; strcmp() may return any integer
When would you use classes and when would you use namespaces?
Use classes to encapsulate code and represent objects, and namespaces to avoid symbol name collisions
Use classes for performance-sensitive code, and namespaces when readability matters more
Use namespaces for performance-sensitive code, and classes when readability matters more
Always use them; namespaces as always superior to classes