PHP

Server Announcement
Report Ads
From MPGH Wiki
Jump to: navigation, search

Personal Home Page, more commonly known as PHP, is an interpreted Object Orientated Programming language.

Background[edit]

PHP is a programming language made by Rasmus Lerdorf, back in 1994. The original aim of PHP was to be a web development language, but can act as a general purpose language. It's native functions are based around web development, but it's still a very powerful general purpose language.


Installation[edit]

For this, we're going to assume you're on windows or osx. If you're on Nix, you probably already know how to install a web server. So to install PHP, we will need a web server, and a few plugins. We could do this manually, but I'm lazy, so we are just going to use XAMPP. To download, click here. Be sure to download the latest version.

After installing, you need to open it. After opening, you should be set for the tutorial.


Introduction[edit]

In this introduction, we're going to; make our own Hello World program; learn simple terminology; cover the basics of the syntax.

Hello World![edit]

Ok, so the following bit of code is going to print Hello World to our browser in raw text,

echo "Hello World";

Now let's do it with HTML,

<!DOCTYPE html>
<html>
   <head>
       <title>Your Title Here!</title>
   </head>
   <body>
       <?= "Hello World"; ?>
   </body>
</html>

Syntax[edit]

Now we have done a simple Hello World program, we can get onto syntax! YAY!

TODO: this.