From the course: PHP for WordPress

What is PHP? - PHP Tutorial

From the course: PHP for WordPress

Start my 1-month free trial

What is PHP?

- [Narrator] PHP stands for PHP hypertext processor. It is a programming language, as opposed to HTML, which is a markup language. The main difference between HTML and PHP is that HTML structures data on a page. PHP allows you to apply logic and perform interactive tasks based on a set of criteria. HTML, CSS, and JavaScript are all client-side languages. Meaning our computers, specifically a web browser, does all the processing. Conversely, PHP is a server-side language. Meaning our server or remote computer does all of the work, then sends the end result to our browsers. You can imagine the process like a translator. The server translates the PHP into a language our browsers can understand. As an example, in PHP, the code would look like this. However, in the browser, we would just see "2." Since PHP has this ability, it's often used to do heavy lifting on websites. Pull information from databases, log into secure areas, run calculations, and display dynamic data. In the context of WordPress, PHP is what grabs all of the content from the database and displays it on the screen for your users. It's also the driving force behind the dashboard. Any time you're adding, removing, or modifying something, PHP code is being run. That means if you want to write a custom template, or create a custom plug-in, you'll need PHP. Specifically, there are a few key areas you should know. Input and output, variables, controlling the flow of your code, associating data with arrays, and generalizing your code. You'll learn all of that and more starting with basic output.

Contents