MCQ Bank
How can you access a static property of a class in PHP?
- A) By using the parent keyword
- B) By using the object of the class
- C) By using the self-keyword
- D) By using the static keyword
When should you use the GET method instead of POST in PHP?
- A) When performing database operations.
- B) When sending sensitive data, such as passwords.
- C) When the data being sent should not be visible in the URL.
- D) When the data being sent is too large to fit in the URL.
What is a server-side technology used for web development?
- A) HTML
- B) CSS
- C) PHP
- D) JavaScript
What is the role of PHP in server-side development?
- A) It interacts with databases and generates dynamic web content.
- B) It handles client-side events.
- C) It manages the server's operating system.
- D) It handles animations and DOM manipulation.
Which one of the following super global arrays is used to retrieve data sent via the HTTP GET method in PHP?
- A) $_REQUEST
- B) $_SERVER
- C) $_GET
- D) $_POST
WHERE keyword in SQL is used to
- A) Specify the IP address of database server
- B) Indicated that only records that match the given criteria expression should be returned
- C) Specify the location where the Database is stored on the server
- D) Indicate the table from which the data should be fetched
What is the purpose of PHP filters?
- A) To handle errors in PHP code
- B) To apply styling to HTML elements
- C) To filter and sanitize user input data
- D) To execute complex database queries
What are regular expressions in PHP?
- A) Predefined functions used to handle errors in PHP
- B) Special characters used to concatenate strings
- C) Patterns used to search, match, and manipulate strings
- D) Built-in PHP functions used for database operations
In SQL if we want to fetch data from multiple tables in a database we use the concept of
- A) Join
- B) Collection
- C) Aggregation
- D) Arrays
Following is the name of a PHP MySQL API
- A) mysqli
- B) phpExtend
- C) JavaScript
- D) phpMyAdmin
Following is the SQL keyword for specifying the table to extract data.
- A) From
- B) Order by
- C) Where
- D) Select
What is the purpose of PHP's try-catch block?
- A) To handle exceptions and errors that occur in PHP code
- B) To prevent errors from occurring in PHP code
- C) To disable error reporting in PHP
- D) To report errors to the user
Following is the SQL keyword for adding a new record in a table.
- A) Select
- B) Update
- C) Add
- D) Insert
We want to execute a group of statements such that if one statement fails then other statements should also not execute. Which databases feature is suitable for this scenario?
- A) Backup
- B) Join
- C) Normalization
- D) Transactions
Which PHP function is used to validate an email address using a filter?
- A) validate_email()
- B) sanitize_email()
- C) filter_var()
- D) filter_input()
When performing a database update, which SQL statement is commonly used?
- A) DELETE
- B) UPDATE
- C) INSERT
- D) SELECT
Contract should be clear, concise and _______.
- A) Consistent
- B) Convenient
- C) Content
- D) Conventional
Software suppliers try to use what are known as _________.
- A) Standard Form Contract
- B) Hire Contract
- C) Consultancy
- D) Standard Form
ISO is concerned with software _____________.
- A) Liability
- B) Performance
- C) Security
- D) Standard
What type of contracts are used to assess some aspect of an organization and to make proposals for improvements?
- A) Consultancy
- B) Fixed Price
- C) Contract Hire
- D) Time and materials