PHP 7 Set 4
Free Online Best Laravel MCQ Questions for improve your basic knowledge of Laravel Framework. This PHP 7 Set 4 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 4.
You scored %%SCORE%% out of %%TOTAL%%.
Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1 |
Which function is used to verify whether a variable contains a value?
A | header() |
B | footer() |
C | isset() |
D | inset() |
Question 2 |
Which one of the following functions is used to determine object type?
A | obj_type() |
B | type() |
C | is_obj() |
D | is_a() |
Question 3 |
Which one of the following function is used to start a session?
A | start_session() |
B | session_start() |
C | session_begin() |
D | session_run() |
Question 4 |
How many methods are available for the exception class?
A | 5 |
B | 6 |
C | 7 |
D | 8 |
Question 5 |
Which one of the following methods is responsible for sending the query to the database?
A | query() |
B | send_query() |
C | sendquery() |
D | mysqli_query() |
Question 6 |
Which one of the following function should I use to find the parent class of a class?
A | get_parent_class() |
B | parent_class() |
C | class_parent() |
D | get_class_parent() |
Question 7 |
Which one of the following is the correct way of declaring a namespace?
A | namespace my(); |
B | namespace my; |
C | my namespace; |
D | namespace(my); |
Question 8 |
Which magic method is used to implement overloading in PHP?
A | __call |
B | __invoke |
C | __wakeup |
D | __unset |
Question 9 |
final keyword prevents child classes from overriding a method by prefixing the definition with final?
A | TRUE |
B | FALSE |
C | both |
D | none of these |
Question 10 |
Which method is used to tweak an object’s cloning behavior?
A | clone() |
B | __clone() |
C | _clone |
D | object_clone() |
Question 11 |
Which keyword is used to refer to properties or methods within the class itself?
A | private |
B | public |
C | protected |
D | $this |
Question 12 |
Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
A | num_rows() |
B | affected_rows() |
C | changed_rows() |
D | mysqli_affected_rows() |
Question 13 |
Which one of the following functions is used to determine whether a class exists?
A | exist() |
B | exist_class() |
C | class_exist() |
D | __exist() |
Question 14 |
Which of the methods are used to manage result sets using both associative and indexed arrays?
A | get_array() and get_row() |
B | mysqli_fetch_array() and mysqli_fetch_row() |
C | get_array() and get_column() |
D | fetch_array() and fetch_row() |
Question 15 |
Which feature allows us to call more than one method or function of the class in single instruction?
A | Typecasting |
B | Method Including |
C | Method chaining |
D | Method adding |
Question 16 |
Which one of the following function is used to send an email using PHP script?
A | mail() |
B | mail_send() |
C | send_mail() |
D | mail_to() |
Question 17 |
Which one of the following keyword is used to inherit our subclass into a superclass?
A | extends |
B | implements |
C | inherit |
D | include |
Question 18 |
Which one of the following methods can be used to diagnose and display information about a MySQL connection error?
A | connect_errno() |
B | connect_error() |
C | mysqli_connect_errno() |
D | mysqli_connect_error() |
Question 19 |
Which of the following method of Exception class returns array of the backtrace?
A | getMessage() |
B | getCode() |
C | getTrace() |
D | getTraceAsString() |
Question 20 |
Which one of the following preg PHP function is used to do a find and replace on a string or an array?
A | preg_replace() |
B | preg_find() |
C | preg_find_replace() |
D | preg_findre() |
Question 21 |
How to get a total number of rows available in the table?
A | SELECT COUNT(*) |
B | SELECT ROW(*) |
C | SELECT TABLE(*) |
D | SELECT SUM(*) |
Question 22 |
Which of the following method scopes is/are not supported by PHP?
A | private |
B | friendly |
C | static |
D | abstract |
Question 23 |
Which one of the following will you use to check the class of an object?
A | class() |
B | _class() |
C | class_check() |
D | get_class() |
Question 24 |
Which one of the following statements can be used to select the database?
A | $mysqli=select_db('databasename'); |
B | mysqli=select_db('databasename'); |
C | mysqli->select_db('databasename'); |
D | $mysqli->select_db('databasename'); |
Question 25 |
Which one of the following databases has PHP supported almost since the beginning?
A | Oracle Database |
B | MYSQL |
C | SQL |
D | SQL+ |
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!