You are currently viewing Complete guide to PHP and PHP Frameworks: Part 1 – Introduction

Complete guide to PHP and PHP Frameworks: Part 1 – Introduction

PHP is one of the most used programming languages when it comes down to web development. It used to stand for “Personal Home Page” and it was built to serve dynamic page content, as of its version 3.0 it stands for PHP (recursively) Hyper Processor. It was originally developed by Rasmus Lerdorf and then Andi Gutmans and Zeev Suraski continued working on it by founding Zend Technologies Ltd (which is taken from their names – Zeev and Andi).

What is PHP and what can PHP do?

With PHP you can virtually do anything related to server-side scripting, command line scripting and write desktop applications. With PHP you can collect data from forms, generate pages that have dynamic content, send and receive cookies and virtually create any kind of website you have ever visited on the Internet. Based on latest research, PHP is used by 82.8% of all the websites whose server-side programming language we know. The most popular sites that are using PHP and have millions of daily views are Facebook, Wikipedia, Baidu, Washington post and much more.

The PHP evolution

PHP went through many changes and each major one was a rewrite of the previous. All of its functions are written in C which provides excellent performance. During its many versions, there weren’t any clearly applied coding standards. This can mostly be observed in its legacy code and due to this, it’s now known as one of the worst structured languages.

PHP is also not strongly typed which is common for scripting languages (like JavaScript) and as it doesn’t require compilation there can be some unexpected outcomes during runtime. For this, you can use type hinting and most frameworks also implement similar functionality by having their own.

As anything else in programming PHP has its own good and bad practices, pros, and cons and it’s one of the few languages that is being standardized (other such being Java). For PHP you can look up – http://www.php-fig.org/). There’s also a documentation called PHP The Right Way which shows in detail how to write quality code. The way code is written in bigger projects depends on the team leader and it’s not necessary that those rules are followed.

It was designed to be an HTML templating language and most of the developers that use different technologies can say that PHP is one of the easiest languages to start with as it’s really easy to launch a website compared to Ruby (Rails), Java (JSP or Spring Boot) and C#(ASP or .NET MVC). Its development is also significantly sped up by the fact that it doesn’t require to be recompiled every time a change is made.

Is PHP still popular?

PHP is considered to be one of the less attractive languages nowadays – why? Because of its legacy code. During the time that it was developed, it was already in use for new projects and to maintain older ones. Along with its many version changes, most projects didn’t migrate its legacy code.

As the language improved there were many websites built on older versions of PHP with no plans of an upgrade. Its current version is 7.1.8 (released 03 Aug 2017) and up to this day, there are still projects running on 5.5 and companies dealing mainly with older versions.

PHP’s version 7 is considered to be almost twice as fast and optimized compared to version 5.6. The 5 version had issues with Unicode and didn’t support it. UTF encoding support was planned for version 6, however, that project was abandoned and the next major version after 5.6 was 7.0 in 2014. Since that was a major failure PHP went directly from 5.6 to 7, skipping it’s version 6.

There wasn’t a clean coding convention as well and developers used to write code as they saw fit (or their team leaders), varying from project to project. This is a huge problem in programming overall as any PHP developer, coding in their own style, had issues with getting up to speed when switching projects and/or teams.

This problem wasn’t only confined to PHP and at the time writing and maintaining code was getting harder and harder for the web development community despite the technology that was used.

What is the next step? – The MVC model

To remedy that the MVC model was introduced and many different PHP frameworks started revolving around it. We’ve recently made an Infographic on the most used PHP frameworks of 2017th and you can look at it from here.

best PHP frameworks 2017

Want to try different PHP frameworks?

Not a problem at all, we offer completely working PHP frameworks hosting environment where you can test and develop your projects, at a very affordable price – NOW WITH 80% OFF!

Useful links from the PHP Frameworks series by WebHostFace:

Part 1 – Complete guide to PHP and PHP Frameworks: Part 1 – Introduction

Part 2 – Model View Controller Architecture and Its Use in Modern PHP Frameworks

Part 3 – PHP Frameworks vs Libraries and Custom Modules

Part 4 – coming soon

Ivan Denchev

Control Systems Engineer switched over to making the internet a better place because unstucking Apache configuration files is easier than unstucking your hand from cogwheels. Usually all of his words are there, just in the wrong order. What you've got with his administration is usually a failure to SSH because some servers you just can't reach.

Leave a Reply