Learn PHP from the Best Tutors
Search in
Because PHP is an interpreted language. This is distinctively different from e.g. Go or C, which are both compiled before they are runs. In practice this means that when you download and install PHP you are really installing an interpreter; a program that receives PHP code as an input, takes actions based on that input (like opening / closing files, performs arithmetic, etc.), and then outputs the result.
However, at least in the beginning*, PHP did not have an inbuilt web server. This is a stark contrast to a language like Go that comes with its own http package, which allows you to run a very efficient web server within your program.
PHP on the other hand, needs help. This is where Apache** comes in. The server listens for http requests on a specific port on the server, normally 80, and it has been instructed to use the PHP interpreter when the request is for specific file extension, such as .php, though any file type will do.
The results from the interpreter are then served to the user like any other file.
* Not sure if it does today… I believe it does but I think it is only meant for development purposes
** Or any other web server for that matter, e.g. Nginx
read lessRelated Questions
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Make a Career in Mobile Application Programming
Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...
8 Hottest IT Careers of 2014!
Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...
Why Should you Become an IT Consultant
Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...
Learn Hadoop and Big Data
Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...
Looking for PHP Classes?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for PHP Classes are on UrbanPro
The best Tutors for PHP Classes are on UrbanPro