Sage-Code Laboratory

What is PHP?

Rasmus Lerdorf released the first version of PHP way back in 1994. It was designed as a light weight scripting language for dynamic websites. It is used by: Facebook, Wikipedia, Flickr, Yahoo!, iStockPhoto, Tumblr, WordPress and many other popular websites.

Learning PHP

Next tutorial will describe PHP language in details. We organize pages in logical order from basic concepts to complex. For each page you should spend between 1 and 3 hours. Don't forget to take a break every hour or even more frequent. Pages are listed in the following index. If you are first time here, please ignore the index and continue reading.

Index:

  1. Syntax
  2. Control Flow
  3. Functions
  4. Arrays
  5. Classes
  6. Exceptions
  7. Files
  8. Web Forms

Creating PHP

Usually one uses a text editor to create PHP code. Most popular editors are free editors for multiple programming languages. You should already have an editor to use if you have learned HTML+CSS. We recommend one of these editors:


PHP Homeworks

Most of our examples are trivial and do not require to be run.Some examples though are better understood if you run them. We call these examples homeworks. To run these we use website: repl.it This website enable you to run PHP CLI or PHP Server snippets. You can use your GitHub account to log-in.

Responsive Image

PHP CLI on repl.it Website


PHP Quiz

Next quiz does not have a time limit, you can interrupt any time and continue later. You can scan the code using a mobile or tablet. If you are already on mobile device, tap the code below to start the quiz. It requires you to sign-in using your Google account.
PHP Quiz

PHP - Quiz

Note: If you take the quiz provide some feedback on Discord. We have a specific channel where you can post your score and comment about your experience. Have you learn something from the quiz? It was difficult? How you wish to improve this quiz?


Privacy Terms: We do not collect your e-mail address but we record your name with the test results on Google drive. If you take more than 80% we will recognize your skill and will endorse you on Linked-in. If you don't agree, you can use name: Anonymous or a fake name but then we can't endorse your new skills.

External References

For further study and updates you can visit the original documentation, available for free oh php public website. This is what I have used to create our tutorial.

LAMP Technology

LAMP = Linux, Apache, MySQL and PHP. This is one of most popular technological stack for creation of dynamic websites. It is based on open source and is preferred by small companies or entrepreneurs.

The Apache HTTP Server is the most popular web server second by Nginx. It can be installed on Linux, UNIX and Windows operating systems usually on server machines.

The Apache HTTP Server was launched in 1995 and it has been the most popular web server on the Internet since April 1996. The Apache HTTP Server is a project of The Apache Software Foundation.

Visit: Apache Home

MySQL Database

A dynamic website is usually based on a data storage. MySQL is an open source database that is very popular among website builders. We do not teach this particular database in our courses. However you can learn all about it from external references.

Visit: MySQL Home Page


Read next: Syntax Overview