PHP Technical Interview Questions and Answers

PHP Technical Interview Questions and Answers

In this Post We Will Explain About is PHP Technical Interview Questions and Answers With Explain technical Interview Questions list.

Welcome on Pakainfo.com – Examples ,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to php technical interview questions for experienced

In this post we will show you Best way to Interview pass php technical interview questions and answers pdf, hear for How to php technical interview questions and answers for freshers with Most Popular Question list share .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Read Also:  Top 10 Common PHP Job Interview Questions and Answers

Question 1 :How can we get the browser properties using PHP?

echo $_SERVER['HTTP_USER_AGENT'];
$data_browser=get_browser(null,true);
print_r($data_browser);

Question 2 : How can we register the variables into a session?

session_register($your_session_var);

Question 3 : How to get Mysql Error while executing query through mysql_query?

$result_data = mysql_query("SELECT * FROM posts");
if(IS_NULL($result_data)){
echo mysql_error();
}

Question 4 : How do you call a constructor for a parent class?

parent::constructor()

Question 5 : How can we know the sum number of elements of Array?

sizeof($mylivevar_array);
count($mylivevar_array);

Question 6 : How can we find the number of rows in a result set using PHP?

$data_object = mysql_fetch_data_object(mysql_query("select count(*) as sum from posts"));
echo $data_object->sum;

Question 7 : Give an example of ternary operator in PHP?

echo ($salary >18000) ? 'Matured' : 'Not Matured' ;

Question 8 : What is the syntax to send a mail in PHP?

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

Question 9 : How can we destroy a session in PHP?

session_destroy();

Question 10 : How can we create a result_database using php?

mysql_create_db('result_database_name');

Question 11 : What are encryption functions in PHP?

CRYPT(), MD5()

Question 12 : How to store the uploaded file to the final location?

$fname = $_FILES["my_latest_doc"]["name"]; 
$fileTmpLoc = $_FILES["my_latest_doc"]["tmp_name"];

$path_endnm = "uploads/".$fname;


$filemove_res = move_my_latest_doc($fileTmpLoc, $path_endnm);

if ($filemove_res == true) {
    echo "File has any been moved data from $fileTmpLoc  to $path_endnm";
} else {
     echo "ERROR: File not any uploaded successfully";
}

Question 13 : How to get full date with php using date function?

echo date('Y-m-d H:i:s'); // simple date 2018-11-12 25:08:05

Question 14 : How we expire cookie?

setcookie($cookieName,$cookieValue,time()-60*60*60*24); //Just set the previous time

Example

Read Also:  php first character uppercase Examples

I hope you have Got php interview questions and answers for 1 year experience pdf And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  FontSpace Web Application Icons
  2. Read Also:  CodeIgniter Stripe Payment Gateway Api Integration
  3. Read Also:  check Element Hidden in jQuery
  4. Read Also:  Currency Filter using Angular Example
  5. Read Also:  Laravel 6 get last Insert id from query builder
  6. Read Also:  country state city drop down list using JavaScript
  7. Read Also:  CodeIgniter Beginners Tutorial Step by Step
  8. Read Also:  Top 10 Yii Interview Questions and Answers for fresher
  9. Read Also:  crud with php oop and mvc design pattern
  10. Read Also:  What is the difference between Java and JavaScript?
CLOSEX