You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
What is the output of the following code?
1
2 function append($str)
3 {
4 $str = $str.'append';
5 }
6
7 function prepend(&$str)
8 {
9 $str = 'prepend'.$str;
10 }
11
12 $string = 'zce';
13 append(prepend($string));
14 echo $string;
15 ?>
What will the following code print?
echo addslashes('I am a small "HTML" string, which is
\'invalid\'.');
What will the following code piece print?
echo strtr('Apples and bananas', 'ae', 'ea')
You analyze the code of a colleague and see a call to the function quotemeta(). You give the string "Holy $%&[. What's going on?" as a parameter to it. What will it output?
Which elements does the array returned by the function pathinfo() contain?