Skip to content
Interview Shortout
  • Home
  • Articles
  • PHP
  • Python
  • Java Script
  • MySQL
  • Magento
  • Startups
  • Other

Top 10 Interview Questions and Answers for PHP freshers

Posted on January 19, 2018 By Dhananjay No Comments on Top 10 Interview Questions and Answers for PHP freshers
PHP

What is difference between $_GET and $_POST?
$_GET stores data sent by HTML form ‘get’ method or the value of variable encoded with URL whereas the $_POST collects the data submitted by “post” method of HTML form. $_GET has a character limit whereas no such limit defined by PHP for the POST.

How many types of array are there in PHP?
Basically, there are three types of arrays in PHP
1- Indexed arrays
2- Associative arrays
3- Multidimensional Arrays

How to convert a string into array and vice-versa?
We can cover an array into a string and a string into an array using explode() and implode() methods.These methods use some delimiter to concat values of arrays and also at the time of splitting a string into an array.

How you can find IP address of Local machine accessing PHP sites?
PHP has a number of superglobals.$_SERVER has some autodetected values. We can use this variable to get the IP address as given below:

1
$_SERVER['REMOTE_ADDR'] ; ?>


In how many ways we can fetch data from MySQL database?
There are four standard ways to fetch data from MySQL database in PHP. They are listed below:
1-mysql_fetch_array()
2-mysql_fetch_assoc()
3-mysql_fetch_row()
4-mysql_fetch_object()

Is PHP an Open Source?
Yes, PHP is absolutely free, and it is an Open Source.It can be used under GPL.

Does PHP supports OOPs Features?
Yes, PHP is a full-featured server-side scripting language and enriched with Object Oriented Programming system approach. We can define a class, constructor. We can create Objects and can implement oops features like Abstraction, Polymorphism, Inheritance, and Encapsulation.

What is the difference between array_merge and array_combine?
We can differentiate between the two terms while understanding their definitions.
array_merge(): Merge Elements of arrays in a single array while preserving their indexes. But array_combine() returns a new array where values in one array are keys in new arrays and values of another array values in new arrays.

What is the Latest stable version of PHP and MySQL?
You should check these things before your Interview because the version the things are updating frequently.
For PHP: www.php.net
For MySQL: www.mysql.com

Post navigation

❮ Previous Post: OOPS interview questions and answers
Next Post: PHP-MySQL Interview Questions and Answers : Most Common Questions ❯

Leave a Reply Cancel reply

You must be logged in to post a comment.

Doglapan

Recent Posts

  • Captable for Startups?
  • What is chat GPT?
  • All about Indexing in MySQL
  • Exploring the Growth and Future of Fintech Companies in Indian Startup Culture
  • Angel Investors in the Indian Startup Ecosystem: Understanding their Characteristics, Benefits and Role

Popular

AJAX artificial intelligence CakePHP Career Certifications CodeIgniter COVID Database Data Science DBMS DevOps Django Drupal ES6 Google Analytics HR Internship Interview Java Script jQuery Magento MVC MySQL PHP reactjs Risk Management Startups Training Visual Basic

Categories

  • AJAX
  • AJAX Interview Questions
  • Android
  • Articles
  • Artificial Intelligence
  • Banking
  • Big Data
  • Cake PHP Interview Questions
  • CakePHP
  • Career Guide
  • Certifications
  • CI/CD
  • Codeigniter Interview Questions
  • Codeigniter4
  • CSS
  • Data Science
  • DBMS
  • DevOps
  • Drupal
  • ES6 Interview Questions
  • Fresher Interview
  • Google Analytics
  • Gov Job
  • HR Interview
  • HTML
  • Internship
  • Interview
  • Java Script
  • jQuery
  • jQuery Interview Questions
  • JSON
  • Magento
  • MVC
  • MySQL
  • MySQL Interview Questions
  • OOPS
  • PHP
  • PHP Interview Questions
  • Python
  • Python Interview Questions
  • Reactjs Interview Questions
  • Resume
  • SEO
  • Startups
  • Visual Basic
  • WordPress
  • Wordpress Tutorial

Resources

  • Home
  • Paid Guest Post
  • About
  • Contact
  • Privacy Policy
  • DCMA
  • Home
  • Paid Guest Post
  • About
  • Contact
  • Privacy Policy
  • DCMA

Copyright © 2023 Interview Shortout.

Theme: Oceanly by ScriptsTown

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}