PHP 7 Set 2
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This PHP 7 Set 2 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 2.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Which one of the following filter is used to filter several variables with the same or different filters?
A | filter_var() |
B | filter_input |
C | filter_var_array() |
D | filter_input_array |
Question 2 |
Which one of the following is a constant variable?
A | const $name |
B | const $NAME |
C | constant NAME |
D | const NAME |
Question 3 |
Which one of the following statements should be used to include a file?
A | #include ‘filename’; |
B | $include ‘filename’; |
C | include ‘filename’; |
D | @include ‘filename’; |
Question 4 |
PHP’s numerically indexed array begin with position ___________
A | 1 |
B | 0 |
C | 2 |
D | -1 |
Question 5 |
Which of the following is correct with regard to echo and print?
A | echo is a construct and print is a function |
B | echo is a function and print is a construct |
C | Both are functions |
D | Both are constructs |
Question 6 |
The inbuilt function to get the number of parameters passed is:
A | arg_num() |
B | func_num_args() |
C | func_args_count() |
D | None of the above. |
Question 7 |
Which function returns an array consisting of associative key/value pairs?
A | array_count_values() |
B | count() |
C | array_count() |
D | count_values() |
Question 8 |
How many ways can a session data be stored?
A | 3 |
B | 4 |
C | 5 |
D | 6 |
Question 9 |
Which of the following variables is not a predefined variable?
A | $get |
B | $post |
C | $ask |
D | $request |
Question 10 |
Which of the following typecast is not correct?
A | decimal |
B | real |
C | double |
D | boolean |
Question 11 |
Which of the following array represents an array with a numeric index?
A | Numeric Array |
B | Associative Array |
C | Multidimentional Array |
D | None of the above. |
Question 12 |
Which of the following is Ternary Operator?
A | && |
B | += |
C | || |
D | ?: |
Question 13 |
How do I check if a given variable is empty?
A | count function |
B | empty() function |
C | get() function |
D | None of the above. |
Question 14 |
We can use ___ to comment a single line?
A | /? |
B | /* */ |
C | // |
D | ** |
Question 15 |
Which of the following function is used to get the value of the previous element in an array?
A | last() |
B | prev() |
C | previous() |
D | before() |
Question 16 |
Which of the following PHP function will return true if a variable is an array or false if it is not an array?
A | in_array() |
B | this_array() |
C | is_array() |
D | do_array() |
Question 17 |
which of the following is a correct declaration?
A | static $varb = 1+(2*90); |
B | static $varb = sqrt(81); |
C | static $varb = array(1,’val’,3); |
D | static $varb = new Object; |
Question 18 |
Which of the following function is used to get length of a string?
A | size() |
B | strlen() |
C | length |
D | None of the above. |
Question 19 |
How to check an element is exists in array or not in PHP?
A | in_array() |
B | is_array() |
C | array_value() |
D | rev_array() |
Question 20 |
Variables/functions in PHP don’t work directly with:
A | echo() |
B | isset() |
C | print() |
D | All of the above |
Question 21 |
How many items are available in the $_FILES array?
A | 2 |
B | 3 |
C | 4 |
D | 5 |
Question 22 |
Which of the following function creates an array?
A | array() |
B | array_change_key_case() |
C | array_chunk() |
D | array_count_values() |
Question 23 |
When you’re uploading files you need to set the enctype of the form to __________
A | text |
B | text/file |
C | multimedia/form-data |
D | multipart/form-data |
Question 24 |
Which in-built function will add a value to the end of an array?
A | array_unshift() |
B | into_array() |
C | add_array() |
D | array_push() |
Question 25 |
Which function do you have to use to check whether the $path you’ve stored exists?
A | is_dir() |
B | path_dir() |
C | path() |
D | path_folder() |
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!