Learn PHP for Free Online
PHP is a server-side scripting language used on the vast majority of the most popular websites on the internet. PHP works under the floorboards, so to speak, telling a website how to manage data so it can be presented on a website. PHP works hand-in-hand with front-end languages and technologies, like HTML or CSS, which define how a website looks to users in terms of fonts and all other elements of page design.
Dynamic webpages, like those on Facebook, serve as a good example for the role PHP plays in web design. What a Facebook page actually looks like is defined by front-end technologies like HTML, CSS, and Java. Those are what determine, for example, where someone's profile picture will be located on the page, and how large that profile picture will be. That's the case for all standard elements of a page. Facebook is dynamic, though, in that it is constantly updating based on user inputs. PHP is the language that defines how new data should be handled and where it should go
A programmer named Rasmus Lerdorf first developed PHP in the 1990s, and it initially stood for personal homepage, but today PHP serves as an acronym for hypertext preprocessor.
PHP Learning Sites
If you are interested in learning PHP but not sure where to start, there are many free sites online that will help you get started. It’s sometimes best to use a combination of these sites, and others, in order to learn PHP more effectively. When learning online, it's always best to vary mediums, too. That means watching videos, reading tutorials, and building things on your own. These are some of the best sites available:
- PHP 101 is a good place to start if you know little or nothing about the language. Like it says on its website, it's for "absolute beginners." So, if that's you, check out this site.
- Codecademy is one of the most popular options for learning any coding language, including PHP, and it doesn’t require any previous programming knowledge. Codecademy is adding new projects for PHP all of the time, making it a good resource to return to as you grow.
- Learn-PHP Interactive Tutorial displays the results of your code as you’re going, and no software installation is required. Many of the lessons available are on basic topics, so this is a great place to start if you’re completely unsure about PHP in general.
- Codecourse has a "Learn PHP" playlist on YouTube, starting from the simplest operations to increasingly complex operations like authentication or multidimensional arrays. These videos are a great companion to any PHP learning you’re undertaking, especially if you’re getting stuck on something. Even better, Codecourse frequently adds new videos on multiple topics if you’re looking to branch out from PHP later on.
- PHPBuddy offers a number of online tutorials, lessons, and articles on coding in PHP. There are few videos and no interactivity, but the descriptive text and screenshots make this a good resource for those who learn well from written instructions. It also can be a good reference to use while learning PHP from another source.
- 1Keydata offers a series of guided tutorials that cover almost every PHP-related topic you can think of. These are text-only tutorials and guides that cover topics like syntax and string functions.
- PHP: The Right Way emphasizes good practice in PHP over all else. It emphasizes tutorials and other sites that enforce the coding practices that are the most efficient. New coders should take note of this site.
These sites are best for those who are comfortable with the basics and ready to move on to something a bit more advanced:
- SitePoint PHP isn’t setup as a guided tutorial like 1Keydata or PHPBuddy, but it offers many tutorials and guides on various topics and trends. It’s best if you have a bit of working PHP knowledge before using this site, so this is a good resource to move to once you've got a good grasp of the basics.
- PHP Cheatsheets is a reference for intermediate to advanced coders who may need help with variable comparisons and variable testing throughout various versions of PHP.
These sites are not tutorials, but they are good sources to keep on hand for reference:
- The PHP Manual is available for free online and is updated as necessary. This isn't specifically a tutorial, but it still serves as an important resource to be bookmarked so you can go to it any time you have a question about something or need to clarify how something works.
- Like the PHP Manual, Tizag offers a textbook-like resource learners can turn to when they have questions or when they need to clarify something. This is another site to bookmark so you can have it handy.
- PHP Basics does offer a tutorial, but one of the best parts of its site is the Q & A where users can get help when they've hit a stumbling block.