10 Questions
What operator is used for catenation in string operations?
period
What is the result of implicit conversion of a string containing a period to a numeric value?
double
What is the result of implicit conversion of a string not containing a period to a numeric value?
integer
What happens if the string does not begin with a sign or a digit during implicit conversion?
result is zero
What is the purpose of the trim function in PHP?
remove whitespace from both ends
What is the difference between ltrim and rtrim?
ltrim removes whitespace from the left, rtrim removes from the right
What is the purpose of the strlen function in PHP?
get the length of a string
How do you explicitly convert a variable to an integer in PHP?
using (int)$total or intval($total)
What is the result of the expression '12a' + 15?
15 or zero
What is the purpose of the floor function in PHP?
get the floor value of a number
A PHP quiz about classes, constructors, and pattern matching using regular expressions. Covers the basics of defining a class, constructors, and destructors, as well as POSIX and Perl-compatible string pattern matching.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free