PHP is a server side scripting language that’s used on nearly 80% of websites. As a server side coding language, it has no competition when it comes to usage.
PHP7+ is extremely fast and secure. That being said, speed and security are relative to the code written by a web developer. It’s the job of a developer to write code logic that’s efficient and secure.
In this series of PHP Tutorials, I’ll teach you the syntax of PHP along with all the basic terms and how to use them properly. As we progress, I will demonstrate more advanced functionality that will take your server side coding with PHP to the next level. As they say, walk before you run.
Let’s build your PHP knowledge with a strong foundation.
PHP (PHP: Hypertext Preprocessor) is used for Web Development. You can use it for other purposes but it’s primary usage is for server side coding.
How Does PHP Work?
Browser Developer Tools
Browser developer tools are used to view front end code of a website with features like View Page Source and Inspect Elements. This is a handy feature of web browsers but also means that your front end code is viewable by anyone who knows how to use these tools.
Server side code is not viewable by the web browser so your server side code is secure.
Web Servers and PHP
A web server is just a computer located in a data center that keeps your files, folders, images and database ready to work 24 hours a day, 7 days a week and hopefully 365 days a year.
Web servers know a file is a PHP file because of the .php extension. This will signify to a web server to handle that file in a specific way.
What Can You Do with PHP?
You can build small to large websites that either use one web server or a multi-server setup. PHP can scale as big as you need it too. Here are some PHP use cases:
- Build a Template System
- Process User Submitted form data
- Create a Membership based website
- Create an Ecommerce Website
- Work with a database like MySQL
- Create customized, user-specific experiences
- encrypt data
- and more.
What do you need to Get Started with PHP Code?
You already have most of what you need to get started.
- Text Editor or IDE
- Web Browser
Beyond that, you will also need a web server running locally on your computer so you can develop locally without worrying about your beta code running on a production website.
You can use a free web server called MAMP which is compatible with both Windows and MacOS. I highly recommend it and in the video below, I show you how to use MAMP for WordPress Development but it’s also what’s used for regular PHP development as well.
My advice is to always code locally, test your code and then once you determine that it’s efficient and secure, that’s when you push it out to your remote web server.