PHP Developer Interview Questions
Applicants who wish to carve out their career as PHP Developer and looking for PHP Developer Interview Questions may acquire complete details about PHP Developer Interview Questions along with solution and may obtain Free PDF Books of PHP Developer from below customized section.
PHP is a server area scripting language usually used for web purpose. PHP has numerous frameworks for making sites. Even a non technical individual can make sites using its CMS. It is also an object oriented programming language like java, C-sharp etc. Before getting the profile of PHP developer, candidates have to face the interview.
Many candidates face so many problems regarding interview questions. For those candidates who face hurdles in their interview we are unfolding some PHP Developer Interview Questions by which you can get help. You can download free PDF books with solutions on our web portal.
PHP Developer Interview Questions
Q1. What is the full form of PHP?
Ans. Hypertext Pre-processor.
Q2. Define PHP?
Ans.PHP is a server side scripting language commonly used for web applications.
Q3. How to create a MySQL connection?
Ans. mysql_connect (servername, username, password);
Q4. What is SSL?
Ans. SSL stands for Secure Sockets Layer. This is a cryptographic protocols which provide secure communications on the Internet.
Q5. What is the difference between GET and POST methods?
Ans. GET method is mostly used for submitting a small amount and less sensitive data. POST method is mostly used for submitting a large amount or sensitive data.
Q6. How do you define a constant?
Ans. define (“MYCONSTANT”, 50)
Q7. What Is a Session?
Ans. A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.
Q8. What is the maximum length of a table name, database name, and fieldname in MySQL?
Ans. Database name-64
Q9. How can I execute a PHP script using command line?
Ans. Just run the PHP CLI (Command Line Interface) program and
provide the PHP script file name as the command line argument.
Q10. How can we create a database using PHP and MySQL?
Ans. We can create MySQL database with the use of mysql_create_db (“Database Name”).
Q11.what is the use of rand() in php?
Ans. It is used to generate random numbers. If called without the arguments it returns a pseudo-random integer between 0 and getrandmax(). If you want a random number between 6 and 12 (inclusive), for example, use rand(6, 12).This function does not generate cryptographically safe values, and should not be used for cryptographic uses. If you want a cryptographically secure value, consider using openssl_random_pseudo_bytes() instead.
Q12.What is mean by an associative array?
Ans. Associative arrays are arrays that use string keys is called associative arrays.
Q13.What is the importance of “method” attribute in a html form?
Ans. “method” attribute determines how to send the form-data into the server. There are two methods, get and post. The default method is get. This sends the form information by appending it on the URL. Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send.
Q14.What is the importance of “action” attribute in a html form?
Ans. The action attribute determines where to send the form-data in the form submission.
Q15.What is the use of “enctype” attribute in a html form?
Ans. The enctype attribute determines how the form-data should be encoded when submitting it to the server. We need to set enctype as ”multipart/form-data”when we are using a form for uploading files
Q16.How to create an array of a group of items inside an HTML form ?
Ans. We can create input fields with same name for “name” attribute with squire bracket at the end of the name of the name attribute, It passes data as an array to PHP.
For instance :
<input name=”MyArray” /> <input name=”MyArray” /> <input name=”MyArray” /> <input name=”MyArray” />
Q17.Define Object-Oriented Methodology
Ans. Object orientation is a software/Web development methodology that is based on the modeling a real world system. An object is the core concept involved in the object orientation. An object is the copy of the real world enity. An object oriented model is a collection of objects and its inter-relationships
Q18.How do you define a constant?
Ans. Using define() directive, like define (“MYCONSTANT”,150)
Q19. How send email using php?
Ans. To send email using PHP, you use the mail () function. This mail () function accepts 5 parameters as follows (the last 2 are optional). You need webserver, you can’t send email from local host. eg : mail($to,$subject,$message,$headers);
Q20.How to find current date and time?
Ans. The date() function provides you with a means of retrieving the current date and time, applying the format integer parameters indicated in your script to the timestamp provided or the current local time if no timestamp is given. In simplified terms, passing a time parameter is optional – if you don’t, the current timestamp will be used.
List of PHP Programming books
- Head First PHP & MySQL by Lynn Beighley and Michael Morrison
- PHP and MySQL Web Development (5th Edition) by Luke Welling and Laura Thomson
- MySQL Cookbook: Solutions for Database Developers and Administrators by Paul DuBois
- Joomla 3 Explained: Your Step-By-Step Guide (Joomla! Press) by Stephen Burge
- Building Web Apps with WordPress by Brian Messenlehner and Jason Coleman
- Advanced Guide to PHP on IBM i by Kevin Schroeder
Note: Dear Job Seekers you can get more information about PHP Developer Interview Questions and your job search through our web portal which is recruitmentresult.com
Something That You Should Put An Eye On