Zusammenfassung der Ressource
Frage 1
Frage
All PHP statements should be surrounded by which delimiters?
Frage 2
Frage
A PHP statement is terminated with which symbol?
Frage 3
Frage
All variables in PHP start with which symbol?
Frage 4
Frage
In PHP, $content = "<p>Hello World</p>". Write a PHP statement that displays the content on the browser screen.
Antworten
-
display($content);
-
echo$content;
-
echo "Hello World";
-
echo content;
Frage 5
Frage
In PHP, you can use either single quotes ('This is a string') or double quote ("This is a string") for strings.
Frage 6
Frage
In PHP, which of the following is the correct way to comment a single line?
Antworten
-
<!--This is a line of comment-->
-
<comment>This is a line of comment</comment>
-
<?php This is a line comment?>
-
//This is a line of comment
Frage 7
Frage
In PHP, which of the following is NOT a correct variable name?
Antworten
-
$3val
-
$val3
-
$val_3
-
$val_of_3
Frage 8
Frage
In PHP, how do you add 1 to a variable called $i?
Frage 9
Frage
How does PHP receive the information from an HTML form that is submitted using he "post" method? Suppose in HTML there's a text box <input type="text"name="userinput">
Antworten
-
$_POST["userInput"];
-
$_GET["userInput"];
-
$_USERINPUT();
-
$_GET(userInput);
Frage 10
Frage
When using the get method to submit an HTML form to a PHP file, the variables are displayed in the URL
Frage 11
Frage
Which of the following is a correct way to create and array in PHP?
Antworten
-
$grades = array (78, 87, 95, 53);
-
$grades = (56, 78, 89, 90);
-
$grades = array ([56], [67], [78], [89]);
-
$grades = {56, 67, 78, 89};
Frage 12
Frage
Write a PHP statement to include a file called "footer.inc"
Antworten
-
<!--include file = "footer.inc"-->
-
<?php include file = "footer.inc";?>
-
<?php include "footer.inc";?>
-
<?php include: "footer.inc;?>
Frage 13
Frage
In PHP, how do you retrieve the content from a file called feedback.txt and store the content in an array call $fileContent?
Antworten
-
$fileContent = "feedback.txt";
-
$fileContent = php_read("feedback.txt");
-
$fileContent = file("feedback.txt");
-
$fileContent = file_read("feedback.txt");
Frage 14
Frage
In PHP file upload in regards to security, which of the following is a true statement?
Antworten
-
Do not allow file uploads
-
It is safe as long as you don't allow .exe file upload
-
It is safe as long as the file size is small
-
It is safe as long as only an account holder can upload a file
Frage 15
Frage
In PHP what will $i+=2 do?
Antworten
-
a typo
-
the value in the variable $i is increased by 2
-
the vriable $i now equals to 2
-
the value in the variable i is increased by 2
Frage 16
Frage
In PHP a session is used so that the server can remember the browser