Post Details

Some Interview Questions and Answers for php developer

09:41 AM | | 580
Some Interview Questions and Answers for php developer

php Interview Questions And Answers

                                                    php interview Questions And Answers

Q. What are types of errors in PHP?
Ans: 1. Notices. 2. Warnings. 3. Fatal Errors.

Q.Differences between GET and POST methods ?
ANS: GET : Data in get method is not secured. Data is displayed in the browser. There can be 1024 bytes send using this method. GET requests can be cached. GET requests remain in the browser history
POST : POST method is secure and not displayed in browser. There is no limit to post data using the POST method.
POST requests are not cached. POST requests does not remains in the browser history.

Q. How to find third maximum salary from salary table?
ANS: SELECT MIN(Emp_Salary) FROM Salary WHERE Emp_Salary IN(SELECT TOP 3 Emp_Salary FROM Salary ORDER BY Emp_Salary DESC).

Q. Difference between mysql_connect and mysql_pconnect?
Ans: mysql_pconnect : Creates a persistent connection to the database that means a SQL link do not close when the execution of your script ends. Mysql_pconnect checks if that if the same host, username and password connection is already opened an identifier for it will be returned instead of making a new connection. While mysql_connect() provides the connection and closes the connection when script execution ends.

Q.Late Static Binding In Php Example-
Ans: Late Static binding feature was introduced in php 5.3.0. This is used to reference the called class in the context of static inheritance. This is used to solve the limitation of inheritance.
Example of Late Static Binding in PHP.
class Country{
public static function printName(){
return static::getName();
private static function getName() {
return 'USA';
class India extends Country{
public static function getName() {
return 'Bangladesh';
echo Country::printName();
// output: USA
echo India::printName();
// output: Bangladesh

Q How to get current date and time in php ?
Ans: $date = date('Y-m-d H:i:s');

Q.php default timezone For Bangladesh .
Ans: date_default_timezone_set("Asia/Dhaka"); 
$date = date('Y-m-d H:i:s');



Top Post

Top Backlinks Blog Commenting site for Seo

599 2016-11-23

Some Interview Questions and Answers for php developer

580 2016-10-30

Configuration of php.ini file

579 2016-10-30

Some Impotent PHP Interview Questions And Answers-part 2

536 2016-11-09

Page Optimization For seo

490 2016-12-04

Registering With Directories

469 2016-12-04

Free web 2.0 Blog websites list for backinks

458 2016-12-11

High PR Link Building

451 2016-12-04

Features of Codeigniter web Application Framework

451 2017-02-25

Some php and MySQL interview Questions

449 2016-12-05