Posted inProgramming / php

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!.

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

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.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype