PHP 12

Lets Crack Online Exam

IT Interview Exam Paper: PHP 12

Subject: PHP 12

Part 12: List for questions and answers of PHP


Q1. Which one of the following databases has PHP supported almost since the beginning?

a) Oracle Database

b) SQL

c) SQL+

d) MySQL


Q2. The updated MySQL extension released with PHP 5 is typically referred to as..

a) MySQL

b) mysql

c) mysqli

d) mysqly


Q3. Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?

a) extension=php_mysqli.dll

b) extension=mysql.dll

c) extension=php_mysqli.dl

d) extension=mysqli.dl


Q4. In which version of PHP was MySQL Native Driver(also known as mysqlnd) introduced?

a) PHP 5.0

b) PHP 5.1

c) PHP 5.2

d) PHP 5.3


Q5. Which one of the following statements is used to create a table?

a) CREATE TABLE table_name (column_name column_type);

b) CREATE table_name (column_type column_name);

c) CREATE table_name (column_name column_type);

d) CREATE TABLE table_name (column_type column_name);


Q6. Which one of the following statements instantiates the mysqli class?

a) mysqli = new mysqli()

b) $mysqli = new mysqli()

c) $mysqli->new.mysqli()

d) mysqli->new.mysqli() 


Q7. 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’);


Q8. 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()


Q9. Which method returns the error code generated from the execution of the last MySQL function?

a) errno()

b) errnumber()

c) errorno()

d) errornumber()


Q10. If there is no error, then what will the error() method return?



c) Empty String

d) 0


Q11. Which one of the following statements should be used to include a file?

a) #include ‘filename’;

b) include ‘filename’;

c) @include ‘filename’;

d) #include ;


Q12. Which one of the following methods is responsible for sending the query to the database?

a) query()

b) send_query()

c) sendquery()

d) query_send() 


Q13. Which one of the following methods recuperates any memory consumed by a result set?

a) destroy()

b) remover()

c) alloc()

d) free()


Q14. Which of the methods are used to manage result sets using both associative and indexed arrays?

a) get_array() and get_row()

b) get_array() and get_column()

c) fetch_array() and fetch_row()

d) fetch_array() and fetch_column()


Q15. 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) new_rows()


Q16. Which version of MySQL introduced the prepared statements?

a) MySQL 4.0

b) MySQL 4.1

c) MySQL 4.2

d) MySQL 4.3


Q17. Which of the following methods is used to execute the statement after the parameters have been bound?

a) bind_param()

b) bind_result()

c) bound_param()

d) bound_result()


Q18. Which one of the following methods is used to recuperating prepared statements resources?

a) end()

b) finish()

c) final()

d) close(


Q19. Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?

a) get_row()

b) fetch_row()

c) fetch()

d) row()


Q20. Which method rolls back the present transaction?

a) commit()

b) undo()

c) back()

d) rollback() 


Part 12: List for questions and answers of PHP


Q1. Answer: d


Q2. Answer: c


Q3. Answer:


Q4. Answer: d


Q5. Answer: a


Q6. Answer: b


Q7. Answer: d


Q8. Answer: c


Q9. Answer: a


Q10. Answer: c


Q11. Answer: b


Q12. Answer: a


Q13. Answer: d


Q14. Answer: c


Q15. Answer: b


Q16. Answer: b


Q17. Answer: a


Q18. Answer: d


Q19. Answer: c


Q20. Answer: d