
For example, if you complete a form on a website and submit it, or click a link to a web page written in PHP, no actual PHP code runs on your computer. The largest Social Networking Platform, Facebook is written using PHP How does PHP work?Īll PHP code is executed on a web server only, not on your local computer. Restricting access to certain pages of your website.Setting and working with website cookies.Processing and saving user input from form data.For example, if you have a blog website, you might write some PHP scripts to retrieve your blog posts from a database and display them. Typically, it is used in the first form to generate web page content dynamically.


Websites and web applications (server-side scripting).It is typically used on websites to generate web page content dynamically. What is PHP used for?Īs of October 2018, PHP is used on 80% of websites whose server-side language is known.

PHP is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP is a server-side scripting language created in 1995 by Rasmus Lerdorf.
