DEV Community

Cover image for A Beginner's Guide to the World of PHP
Bright C. Emeka
Bright C. Emeka

Posted on

A Beginner's Guide to the World of PHP

Introduction
PHP is an open-source server-side scripting language; it is free to use (you don't have to pay for licenses etc.) and it supports Windows, Linux and Unix servers. Developed by Rasmus Lerdorf, the language (PHP) is one of the most used server side scripting languages for web development with a a thriving ecosystem of PHP programmers, it is also beginner friendly; judging from online testimonials, PS. I am also on this journey as an explorer and learning enthusiast.

Your PHP code is embedded in HTML delineated with special start and end tags "<?php" and "?>". The start and end tags tells your server that the codes in between is PHP and should be executed on the server and before it is then sent to your browser. The web page displayed is the file generated from the code's execution. The underlying PHP code is hidden from the user.

Some of PHP's Strengths
PHP provides a level of source code security. As a server-side scripting language, the user-client does not see your source code, it is only available to the server and people maintaining the server files. This adds a layer of security to your scripts.

No browser compatibility and configuration issues. PHP scripts are interpreted and run on the web server alone, so there’s no need to worry about whether the language features you’re using are supported by the visitor’s browser and this also eliminates issues arising from client-side configurations.

Supports Database connectivity
PHP supports connection to a number of databases including but not limited to: MySQL, Oracle and more.

Alternatives to PHP
If you've experimented with PHP and still feel like checking out other server-side languages, you can use any of the following: Node.js, Ruby, Python, Erlang, PERL, Microsoft ASP.NET, JavaSErver Page etc.

Installing as a module for Apache Web Server
To run PHP, your web browser needs some help. Web browsers do not understand PHP scripts. If you files are hosted online then probably your Web Host would already have PHP Set-up for You. For beginners it is good practice to have a local server on your PC this way you can experiment with and test your PHP scripts. For Local Development servers there is a number of options available, they include; XAMPP, WAMP, LAMP, MAMP.

Note: This article would be updated from time to time as I continue to explore, feel free to point areas If I missed something and also share your thoughts on this piece with me, Cheers!

Top comments (0)