PHP5 is advanced version of PHP with special functionalities. It focuses on OOP, XML and MySQL support. In PHP5, the objects can be passed reference not just by value. New version of mysql is supported here. It supports prepared statements, ssl connections, multi query functions. XML extension will handle the data in more sophisticated way. In PHP5, exception handling is performed. PHP5 introduces the iterator which used in for each loop. Good number of positions is available for the candidates. Good knowledge on PHP5 will boost your confidence. Follow our Wisdomjobs page for PHP5 interview questions and answers page to get through your job interview successfully in first attempt. Interview questions are exclusively designed for job seekers to assist them in clearing interviews.
Question 1. Which Will Print Out The Php Call Stack?
Answer :
var_dump($e->getTraceAsString());
Question 2. What Enctype Is Required For File Uploads To Work?
Answer :
multipart/form-data
Question 3. Which Is Not A File-related Function In Php?
Answer :
fappend
Question 4. What Would Occur If A Fatal Error Was Thrown In Your Php Program?
Answer :
The PHP program will stop executing at the point where the error occurred.
Question 5. What Is The String Concatenation Operator In Php?
Answer :
( . )
Question 6. Which Function Can Be Used To Delete A File?
Answer :
unlink
Question 7. What Function Should You Use To Join Array Elements With A Glue String?
Answer :
implode
Question 8. Which Is Useful For Method Overloading?
Answer :
__call,__get,__set
Question 9. Which Is True About The Singleton Design Pattern?
Answer :
A singleton pattern means that a class can have only one instance object.
Question 10. Which Is Incorrect With Respect To Separating Php Code And Html?
Answer :
As PHP is a scripting language, HTML and PHP cannot be separated.
Question 11. Which Is The Correct Way To Check If A Session Has Already Been Started ?
Answer :
if (session_id()) echo 'session started';
Question 12. Which Cryptographic Functions In Php Returns The Longest Hash Value?
Answer :
sha1()
Question 13. Which Will Start A Session?
Answer :
session_start();
Question 14. Which Variable Declarations Within A Class Is Invalid In Php?
Answer :
internal $term = 3;
Question 15. Does Php 5 Support Exceptions?
Answer :
Yes,PHP 5 supports Exceptions.
Answer :
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));
Answer :
memory_limit = 128M
Answer :
filesize
Answer :
mail($to,$subject,$body)
Question 20. Which Is Not A Php Magic Constant?
Answer :
Time
Question 21. Which Is Used To Maintain The Value Of A Variable Over Different Pages?
Answer :
session_register() is used to maintain the value of a variable over different pages.
Answer :
$arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]);
Question 23. Which Will Check If A Function Exists?
Answer :
function_exists()
Question 24. What Is The Correct Syntax Of Mail() Function In Php?
Answer :
mail ($to, $subject, $message,$headers)
Question 25. Can Php Use Gettext?
Answer :
Yes. We can use gettext in PHP.
Question 26. What Is The Correct Php Command To Use To Catch Any Error Messages Within The Code?
Answer :
set_error_handler('error_handler');
Question 27. Which Is Correct About Mysqli And Pdo?
Answer :
Mysqli can only be used to access MySQL database while PDO can be used to access any DBMS.
PHP5 Related Tutorials |
|
---|---|
PHP Tutorial | MySQL Tutorial |
Drupal Tutorial | WordPress Tutorial |
Joomla Tutorial | CakePHP Tutorial |
CodeIgniter Tutorial | PHP7 Tutorial |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.