Top 27 Php5 Interview Questions You Must Prepare 14.Jun.2024

A singleton pattern me that a class can have only one instance object.

Use PDO prepared statements and parameterized queries: for example: $input= $_POST["user-input"] $stmt = $pdo->prepare('INSERT INTO table (column) VALUES (":input"); $stmt->execute(array(':input' => $input));

As PHP is a scripting language, HTML and PHP cannot be separated.

session_register() is used to maintain the value of a variable over different pages.

Yes,PHP 5 supports Exceptions.

mail ($to, $subject, $message,$headers)

The PHP program will stop executing at the point where the error occurred.

Mysqli can only be used to access MySQL database while PDO can be used to access any DBMS.


Yes. We can use gettext in PHP.