When uploading a file to a PHP script using the HTTP PUT method, where would the information about this file be available?
What method can be used to find a tag with the name "foo" via the DOM extension?
What is the output of the following code?
printf('%4$d %2$s sit on 2 trees and eat %3$3.2f %1$s', "bananas",
"monkeys", 9, 99);
You want to present the following formatted number: "999.000.000,00". Which function call is correct?
You want to parse a URL into its single parts. Which function do you choose?
What is the purpose of the 4th argument to the file_get_contents() function?
$_SERVER consists of data provided by the web server and is therefore trustworthy.
You are creating an application that generates invoices in a variety of formats, including PDF, ODS and HTML. Each of these formats is represented as a PHP class in your application. While some of the operations can be performed on all of the different formats (such as saving and loading), other operations may be specific to one or two of the formats (such as setting as read only). Which design pattern should you use for this application?
Which of the following statements is NOT true?
a) Class constants are public
b) Class constants are being inherited
c) Class constants can omit initialization (default to NULL)
d) Class constants can be initialized by consts
When checking whether two English words are pronounced alike, which function should be used for the best possible result?
You want to allow your users to submit HTML code in a form, which will then be displayed as real code and not affect your site layout. Which function do you apply to the text, when displaying it? (Choose 2)
What super-global should be used to access information about uploaded files via a POST request?
Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
An HTML form contains this form element:
When this form is submitted, the following PHP code gets executed:
1
2 move_uploaded_file(
3 $_FILES['myFile']['tmp_name'],
4 'uploads/' . $_FILES['myFile']['name']);
5 ?>
Which of the following actions must be taken before this code may go into production?
(Choose 2)
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?
What XML component does the following XPath query try to match?
//foo[bar/@id=5]