PHP String and Regular Expression

Answer all questions carefully. After submission, you will see a detailed result and answer review.

Question 1
Which one of the following functions finds the last occurrence of a string, returning its numerical position?
Question 2
Say we have two compare two strings which of the following function/functions can you use? <div>(i) strcmp()</div> <div>(ii) strcasecmp()</div> <div>(iii) strspn()</div> <div>(iv) strcspn()</div>
Question 3
Which one of the following regular expression matches any string containing zero or one p?
Question 4
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions?
Question 5
Which one of the following functions will convert a string to all uppercase?
Question 6
Which one of the following functions can be used to concatenate array elements to form a single delimited string?
Question 7
PHP has long supported two regular expression implementations known as ___ and ___.<div>(i) Perl</div> <div>(ii) PEAR</div> <div>(iii) Pearl</div> <div>(iv) POSIX</div>
Question 8
What will be the output of the following PHP code? <pre class="prettyprint"> < ?php echo str_pad("Salad", 5)." is good."; ?> </pre>
Question 9
What will be the output of the following PHP code? <pre class="prettyprint"> < ?php $url = "nachiketh@example.com"; echo ltrim(strstr($url, "@"),"@"); ?> </pre>
Question 10
What will be the output of the following PHP code? <pre class="prettyprint"> < ?php $title = "O'malley wins the heavyweight championship!"; echo ucwords($title); ?> </pre>