logo
Most Common 10 PHP Interview Questions Freshers Need to Know RN


PHP is a server-side scripting language mostly used for developing dynamic web applications. It includes code frameworks, like Symphony, Laravel, Codelgniter and CakePHP, content management systems, such as Joomla, WordPress and Drupal and robust Ecommerce platforms. 


PHP helps fresher candidates. It is the most common language to learn and it is the basic technical qualification you need to excel at. Get PHP course training in Kolkata from the experts - TechTree India.

Here’s a round-up of most common 10 PHP interview questions which will help you sail through a tight interview session. Get started:


Why is “echo” used in php?


It is used for printing a data in the webpage.


For an instance, <?php echo ‘Car insurance'; ? >, is the code to print a text on the webpage.


What is the difference between unset() and unlink() functions?


The former is used to kill a variable, while the later is used to destroy a file.


What is the difference between GET and POST methods?


With the help of GET method, we send 1024 bytes, while POST method transfers a huge bulk of data. Also, the latter is more secure a method than GET.


What is the difference between Session and Cookie?


The major point of difference between the two is that the sessions are stored on the server, while cookies are kept inside a user’s computer in text file format. The specialty of session is to hold multiple variables as the cookies fail to hold multiple variables.


How to organize cookies in PHP?


Its simple, enter Setcookie(“sample”, “ram”, time()+3600);


Why is isset() used in PHP?


The sole purpose of this function is to detect if a variable is set or not, or whether it is NULL.

How to churn out random numbers with PHP?


Generating random numbers in PHP is done using the rand() function – it generates numbers all within a given range.


How can you direct a page in PHP?


To do this, use the code header(“Location:index.php”);.


How can you assert an array in PHP?


Follow this way:


var $arr = array(‘Php’, ‘java’, ‘ruby’)


Can you mention a use of “enctype” attribute in HTML structure?


The main purpose of enctype attribute is to determine how the form-data is to be encoded while submitting it to the server. We need to set enctype as “multipart/form-data” at the time of uploading files.


However to master the so-common question regarding PHP, you need to first get hold of an excellent PHP training institute in Kolkata. Drop by TechTree India – they offer some top of the line vocational trainings on various in-demand skills.


Read Also Our New Updates



0 Comments
Please login to post your comment..


Social

Reviews
  • Be the first one to review us.

Post your Review

Rate it

TechTree India

Techtree Technologies - SAS, R Programming, Hadoop, Advance Excel, SPSS, Android, Digital Marketing Training Institute in Kolkata