Tuesday, 19 May 2015

PHP Fundermantals

Well... its pretty obvious that PHP is the leading web programming language with more than i don't know but i guess at least 1 Million sites. 

PHP is a pretty straight forward programming language based on the Perl and inherits it's syntax from C. Lets get rolling..

Brief history as always

PHP is a server side scripting language designed primarily for web development though can be used for generic programming. Its an interpreted language and runs on the PHP processing engine. Most installations of PHP are bundled in a package called WAMP (W=Windows) or LAMP (L=Linux) or XAMP (X=Cross Platform) Apache, MYSQL and PHP. Apache is a web server developed by the Apache Group, MYSQL acquired and mantained by Oracle Cooperation and PHP which is a language we just defined earlier mantained by the Zend Group. PHP is originally a structured programming language meaning that you write code segments in form of functions just like how you've do it in C but they recently introduced classes into PHP making it partly object oriented and structured as well. 

In the flow.

PHP code can be mixed up with HTML code or other templates provided by the different frameworks and works perfectly. The canonical PHP interpreter is powered by the Zend Engine and is freely released under the PHP license. Good thing about PHP is that it supports a vast number of Operating Systems and has a wide community out there. Only problem with it is that there was no standard or written spec for the language until 2014 making the canonical PHP engine as the de-facto standard. I'm sure there is ongoing work with an attempt to make formal PHP specification.

Give credit to Rasmus_Lerdorf for writing the CGI (Common Gateway Interface) in the C programming language and later released the PHP/FI (Personal Home Page Tool Version 1). 
The truth is that PHP was originally not intended to be a programming language. But Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed a base of the PHP3 changing the name to the recursive acronym PHP

PHP is not that big for a developer to get started and is pretty straight forward.. Below is a sample hello world code in PHP

   <?php
     echo "Hello World<br>";
   ?>

PHP code is identified with the opening  identifier "<?php" and closed using the "?>" and that inside that you can place your PHP logic and program flow. 


That's my basic overview of the PHP programming language. Catch me later for detailed examples and sample projects in the PHP programming Language.