1. Which method scope prevents a method from being overridden by a subclass?
Correct : C. Final
2. Which of the following statements are true is/are true about constructors in PHP?
(i) PHP 4 introduced class constructors.
(ii) Constructors can accept parameters.
(iii) Constructors can call class methods or other functions
(iv) Class constructors can call on other constructors.
Correct : A. All of the mentioned
3. PHP recognize constructors by the name.
Correct : D. function __construct()
4. Which version of PHP introduced the instance of keyword?
Correct : B. PHP 5
5. Which one of the following functions is used to determine whether a class exists?
Correct : C. class_exist()
6. Which one of the following functions is used to determine object type?
Correct : C. is_a()
7. Which one of the following keyword is used to inherit our subclass into a superclass?
Correct : A. . extends
8. Which keyword is used to refer to properties or methods within the class itself?
Correct : D. . $this
9. Which keyword allows class members (methods and properties) to be used without
needing to instantiate a new instance of the class?
Correct : C. static
10. _________ is a blue print of any object in OOP.
Correct : A. class
11. An _____ is an instance or occurrence of our class.....
Correct : B. object
12. The _____ method starts with two underscores (__).
Correct : C. Construct
13. _______an object means converting it to a byte stream representation that can be
stored into file.
Correct : D. Serializing
14. A class property used by another class is called ______.
Correct : D. inheritance.
15. _________is used to support multiple inheritance
Correct : B. Interface
16. The ability to hide the details of implementation is known as _____.
Correct : C. Encapsulation
17. An _______ is one that cannot be instantiated, only inherited
Correct : A. Abstract class
18. Constant name are proceeded by _____ like a normal variable declaration.
Correct : B. dollar sign($)
19. _______ is available when a method is called from within an object context
Correct : C. $this
20. in PHP, An _____is a special variable, which can hold more than one value at
a time.
Correct : A. array
21. In PHP, there are three types of arrays:
Correct : D. all of the above
22. in PHP ,The____ function is used to return the length (the number of
elements) of an array:
Correct : A. count
23. The index can be assigned automatically (index always starts at 0), like
this: $cars = array("Volvo", "BMW", "Toyota");
Correct : A. true
24. The _____ functions can be used to find the lowest or highest value in a list of
arguments:
Correct : B. min & max
25. The _____ function returns the absolute (positive) value of a number:
Correct : C. abs
26. the _____function returns the square root of a number:
Correct : D. sqrt()
27. The _____function rounds a floating-point number to its nearest integer:
Correct : A. round
28. The _______ function generates a random number:
Correct : A. rand
29. To create a constant, use the _____ function.is used
Correct : A. define()
30. In PHP7, you can create an Array constant using the ____ function.
Correct : A. define()
31. The ____statement is used to perform different actions based on
different conditions.
Correct : A. switch
32. The PHP ____function formats a timestamp to a more readable date and time.
Correct : A. date()
33. A ______is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values.
Correct : A. cookie
34. A ______ is a way to store information (in variables) to be used
across multiple pages.
Correct : B. session
35. _______are the two main aspects of object-oriented programming.
Correct : A. classes and objects
36. A ______allows you to initialize an object's properties upon creation of the
object.
Correct : B. constructor
37. If you create a __construct() function, PHP will automatically call this
function when you create an object from a class.
Correct : A. true
38. A ______is called when the object is destructed or the script is stopped or
exited.
Correct : A. destructor
39. If you create a __destruct() function, PHP will automatically call this
function at the end of the script.
Correct : A. true
40. URL stands for ____________ .
Correct : A. Uniform resource locator
41. The __________ array contains information from the web server.
Correct : B. S_server
42. The _________ works through request header and response.
Correct : A. Authentication
43. _____________ is a php super global variable which is used to access global
variable from anywhere in PHP script.
Correct : B. $_Global
44. The size of file can be limited using _________ limit and _____________ limit.
Correct : A. soft and hard
45. How do you create cookie in PHP by ________.
Correct : A. set-cookie()
46. MYSQL i here "i" means________
Correct : C. improved
47. Data source name in pear DB is _________
Correct : A. String
48. Which are build in data types that sql supports?
Correct : A. real ,double precision
49. which type of language used in sql
Correct : A. DDL
50. java script was designed as a _____ scripting language.
Correct : D. Client
51. HTTP stands for ___________.
Correct : A. Hyper text transfer protocol
52. Get and ________ are two HTTP methods that a client use to pass from data
server.
Correct : B. Post
53. ______ tag is used for multiple selections.
Correct : A. select tag
54. To upload the file ________ array is used.
Correct : A. $Files
55. PHP was designed as a ________ scripting language.
Correct : A. Sever side
56. ____________is about communication between web clients and servers
Correct : A. WWW
57. Communication between client computers and web servers is done by sending
_________________.
Correct : A. HTTP request & HTTP Responses
58. A ______is a small file that the server embeds on the user's computer. Each time
the same computer requests a page with a browser, it will send the ________ too.
Correct : A. Cookie & cookie
59. _______ statements reduce parsing time as the preparation on the query is done
only once (although the statement is executed multiple times)
Correct : A. Prepared
60. The MySQLi functions allows you to access______ database servers.
Correct : A. Mysql
61. The____ function fetches a result row as an associative array, a numeric array, or
both.
Correct : A. fetch array()
62. The ssl_set()function is used to establish secure connections using _____
Correct : A. secure socket layer (SSL)
63. __________ function is used to change the default database for the connection.
Correct : D. mysqli_select_db()
64. An inherited class is defined by using the ______ keyword.
Correct : A. extends
65. Abstract classes and methods are when the parent class has a named method,
but need its child class(es) to fill out the tasks.
Correct : A. true
66. An abstract class is a class that contains at least one abstract method. An
abstract method is a method that is declared, but not implemented in the code.
Correct : A. true
67. When inheriting from an abstract class, the child class method must be defined
with the same name, and the same or a less restricted access modifier.
Correct : A. true
68. Interfaces allow you to specify what methods a class should implement.
Correct : A. true
69. Interfaces are declared with the ________ keyword:
Correct : A. interface
70. Interface are similar to abstract classes. The difference between interfaces and abstract classes are Interfaces cannot have properties, while abstract classes can have.
Correct : A. interface
71. To implement an interface, a class must use the______ keyword.
Correct : C. implements
72. In PHP, there are three types of arrays one is not type of array in php
which one:
Correct : D. polygamy array
73. An inherited class is defined by using the extends keyword.
Correct : A. true
74. Classes and objects are the two main aspects of __________________
Correct : A. object oriented programming
75. A constructor allows you to initialize an object's properties upon creation of the
object.
Correct : A. true
76. If you create a _______function, PHP will automatically call this function when
you create an object from a class.
Correct : A. __construct()
77. A destructor is called when the object is destructed or the script is stopped or
exited.
Correct : A. true
78. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values.
Correct : A. true
79. A session is a way to store information (in variables) to be used
across multiple pages.
Correct : A. true
80. Which one of the following databases has PHP supported almost since the
beginning?
Correct : D. MySQL
81. Which one of the following statements is used to create a table?
Correct : A. CREATE TABLE table_name (column_namecolumn_type);
82. Which method returns the error code generated from the execution of the last
MySQL function?
Correct : A. errno()
83. If there is no error, then what will the error() method return?
Correct : C. . Empty String
84. Which one of the following statements should be used to include a file?
Correct : B. include ‘filename’;
85. Which one of the following methods recuperates any memory consumed by a
result set?
Correct : D. free()
86. Which one of the following methods can be used to diagnose and display
information about a MySQL connection error?
Correct : C. mysqli_connect_errno()
87. Which method retrieves each row from the prepared statement result and assigns
the fields to the bound results?
Correct : C. . fetch()
88. Which one of the Following methods is responsible for sending the query to
Database
Correct : A. query()
89. Which is the comment symbol in mysql?
Correct : C. #
90. A ________ consists of one or more tables.
Correct : A. database
91. ________ is used to uniquely identify the rows in table.
Correct : A. primary key
92. _____ returns the last error description for the most recent function call
Correct : A. Error no
93. A _______ is a server that manages data for user.
Correct : A. Wamp
94. RDBMS stands for __________.
Correct : A. Relation data base management
95. In PHP $Icon=mySQL_connect("localhost","root","") is used to ____ to the data
base .
Correct : C. connect
96. mysql_close() is use to ________database(wamp) in php .
Correct : B. close
97. ______ is use to create the web page .
Correct : A. Word press
98. die(mySQL_error()) is used to show _______ message .
Correct : A. error
99. The long form of SQL is __________.
Correct : A. Structural query language
100. the switch statement is used to perform different actions based on different
conditions