PHP 7 Set 1
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This PHP 7 Set 1 test that contains 25 Multiple Choice Questions with 4 options. You have to select the right answer to a question.
Start
Congratulations - you have completed PHP 7 Set 1.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
What is the description of Error level E_ERROR?
A | Near-fatal error |
B | Fatal run-time error |
C | Compile-time error |
D | Fatal Compile-time error |
Question 2 |
Which of the following is the correct syntax of php?
A | |
B | |
C | |
D | ?php ? |
Question 3 |
Which function is responsible for sending a custom message to the system log?
A | systemlog() |
B | log_system() |
C | syslog() |
D | sys_log() |
Question 4 |
Which of the below statements is equivalent to $sub -= $sub?
A | $sub = $sub |
B | $sub = $sub -$sub |
C | $sub = $sub - 1 |
D | $sub = $sub - $sub - 1 |
Question 5 |
What is the default value of max_input_time directive in PHP 7.4?
A | 30 seconds |
B | 60 seconds |
C | 120 seconds |
D | 1 minute |
Question 6 |
Which statement will output $lfc on the screen?
A | echo "$lfc"; |
B | echo "$$lfc"; |
C | echo "/$lfc"; |
D | echo "$lfc;"; |
Question 7 |
Which one of the following should not be used while sending passwords or other sensitive information?
A | GET |
B | POST |
C | REQUEST |
D | NEXT |
Question 8 |
7. Which of following is not a Superglobals in PHP?
A | $_SERVER |
B | $_ENV |
C | $_FILES |
D | $_PUT |
Question 9 |
When you use the $_GET variable to collect data, the data is visible to ___________
A | none |
B | only you |
C | everyone |
D | selected |
Question 10 |
How can we submit a form without a submit button?
A | formname.submit() |
B | document.form_id.submit() |
C | document.submit() |
D | document.formname.submit() |
Question 11 |
Which statement will output $x on the screen?
A | echo $x; |
B | echo “$$x”; |
C | echo '/$x'; |
D | echo “$x;”; |
Question 12 |
Suppose you want to calculate the date 45 days from the present date which one of the following statement will you use?
A | totime(“+45”) |
B | todate(“+45”) |
C | strtotime(“-45 days”) |
D | strtotime(“+45 days”) |
Question 13 |
What are default session time in php 7.4?
A | 12 minutes |
B | 15 minutes |
C | 24 minutes |
D | 30 minutes |
Question 14 |
Which variable is used to collect form data sent with both the GET and POST methods?
A | $_POST |
B | $_GET |
C | $_BOTH |
D | $_REQUEST |
Question 15 |
Which of the following can be used to get information sent via get/post method in PHP?
A | $REQUEST |
B | $_REQUEST |
C | $REQUEST_PAGE |
D | None of the above. |
Question 16 |
Who among this is the founder of php language?
A | Tim Berners-Lee |
B | Brendan Eich |
C | Guido van Rossum |
D | Rasmus Lerdorf |
Question 17 |
Which of the following is used to get information sent via get method in PHP?
A | $GETREQUEST |
B | $GET |
C | $_GET |
D | None of the above. |
Question 18 |
Which of the following type of variables are sequences of characters, like 'PHP supports string operations.'?
A | Arrays |
B | Objects |
C | Strings |
D | Resources |
Question 19 |
The term PHP is an acronym for PHP:_______________.
A | Hypertext Preprocessor |
B | Hypertext multiprocessor |
C | Hypertext markup Preprocessor |
D | Hypertune Preprocessor |
Question 20 |
What is the use of nl2br() in PHP?
A | page breaks |
B | HTML line breaks |
C | HTML paragrapg breaks |
D | HTML tag breaks |
Question 21 |
PHP is a ____________ language?
A | user-side scripting |
B | client-side scripting |
C | server-side scripting |
D | Both B and C |
Question 22 |
Which one of the following function is useful for producing a timestamp based on a given date and time?
A | time() |
B | mktime() |
C | mrtime() |
D | mtime() |
Question 23 |
Which of the below statements is equivalent to $add += $add?
A | $add = $add |
B | $add = $add +$add |
C | $add = $add + 1 |
D | $add = $add + $add + 1 |
Question 24 |
8. If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?
A | 12 |
B | 1 |
C | 5 |
D | error |
Question 25 |
Which of the following variable is used for the PHP script name?
A | $_PHP_SELF |
B | $SELF |
C | $PHP |
D | None of the above. |
Once you are finished, click the button below. Any items you have not completed will be marked incorrect.
Get Results
There are 25 questions to complete.
← |
List |
→ |
Return
Shaded items are complete.
1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 |
End |
Return
You have completed
questions
question
Your score is
Correct
Wrong
Partial-Credit
You have not finished your quiz. If you leave this page, your progress will be lost.
Correct Answer
You Selected
Not Attempted
Final Score on Quiz
Attempted Questions Correct
Attempted Questions Wrong
Questions Not Attempted
Total Questions on Quiz
Question Details
Results
Date
Score
Hint
Time allowed
minutes
seconds
Time used
Answer Choice(s) Selected
Question Text
All done
Need more practice!
Keep trying!
Not bad!
Good work!
Perfect!