PHP 7 Set 3
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This PHP 7 Set 3 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 3.
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 function reads a directory into an Array?
A | getdirectory() |
B | scandirectory() |
C | scandir() |
D | readdir() |
Question 2 |
Which of the following PHP functions can be used to get the current memory usage?
A | get_usage() |
B | get_peak_usage() |
C | memory_get_usage() |
D | memory_get_peak_usage() |
Question 3 |
How can return a value from a function?
A | echo $value; |
B | print $value; |
C | return $value; |
D | None of the above. |
Question 4 |
Which function is used to remove all HTML tags from a string passed to a form?
A | remove_tags() |
B | strip_tags() |
C | tags_strip() |
D | tags_remove() |
Question 5 |
A function in PHP which starts with __ (double underscore) is known as __________
A | Magic Function |
B | Inbuilt Function |
C | Default Function |
D | User Defined Function |
Question 6 |
Which of the following function is used to read the content of a file?
A | filesize() |
B | fopen() |
C | file_exist() |
D | fread() |
Question 7 |
Which one of the following functions finds the last occurrence of a string, returning its numerical position?
A | strlastpos() |
B | strpos() |
C | strlast() |
D | strrpos() |
Question 8 |
Which one of the following functions can be used to compress a string?
A | zip() |
B | gzcompress() |
C | compress() |
D | zip_compress() |
Question 9 |
Which of the following magic constant of PHP returns function name?
A | _LINE_ |
B | _FILE_ |
C | _FUNCTION_ |
D | _CLASS_ |
Question 10 |
Which of the following PHP functions accepts any number of parameters?
A | func_get_argv() |
B | func_get_args() |
C | get_argv() |
D | get_argc() |
Question 11 |
Which of the following function sorts an array in reverse order?
A | rsort() |
B | sort() |
C | shuffle() |
D | reset() |
Question 12 |
Which one of the following functions will convert a string to all uppercase?
A | strtoupper() |
B | uppercase() |
C | str_uppercase() |
D | struppercase() |
Question 13 |
Which one of the following functions can be used to concatenate array elements to form a single delimited string?
A | explode() |
B | concat() |
C | implode() |
D | concatenate() |
Question 14 |
Which one of the following function is capable of reading a file into an array?
A | file() |
B | arrfile() |
C | arr_file() |
D | file_arr() |
Question 15 |
Which of the following function is used to locate a string within a string?
A | strpos() |
B | locate() |
C | search() |
D | None of the above. |
Question 16 |
Which one of the following PHP function is used to determine a file’s last access time?
A | fileltime() |
B | filectime() |
C | fileatime() |
D | filetime() |
Question 17 |
Which one of the following PHP functions can be used to find files?
A | glob() |
B | file() |
C | fold() |
D | get_file() |
Question 18 |
Which one of the following function is capable of reading a specific number of characters from a file?
A | fgets() |
B | fget() |
C | fileget() |
D | filegets() |
Question 19 |
Which of the following PHP functions can be used for generating unique ids?
A | id() |
B | md5() |
C | hash() |
D | uniqueid() |
Question 20 |
Which function sets the file filename last-modified and last-accessed times?
A | sets() |
B | set() |
C | get() |
D | touch() |
Question 21 |
Which of the following variable is used to generate random numbers using PHP?
A | srand() |
B | rand() |
C | random() |
D | None of the above. |
Question 22 |
Which of the following is used to check that a cookie is set or not?
A | getcookie() function |
B | $_COOKIE variable |
C | isset() function |
D | None of the above. |
Question 23 |
Which of the following function is used to get environment variables in PHP?
A | getenv() |
B | search() |
C | environment() |
D | env() |
Question 24 |
Which one of the following function is capable of reading a file into a string variable?
A | file_contents() |
B | file_get_contents() |
C | file_content() |
D | file_get_content() |
Question 25 |
Which of the following function is used to redirect a page?
A | redirect() |
B | header() |
C | reflect() |
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!