Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    A small course in 8 short lessons on the basics of PHP, the language that runs many websites on the server. You learn echo, variables, numbers, choices with if, loops, functions, arrays and how to handle input from a visitor safely. PHP runs on a server, so this course checks your code instead of running it.

    Features

    • 8 short lessons, from echo to safe input from a visitor
    • Check my answer, a hint and the model answer for every lesson
    • Shows what the model answer prints on a server
    • Your progress is remembered in this browser

    How to use Learn PHP

    1. Read the lesson and the task.
    2. Write your code in the editor.
    3. Press Check my answer. Use the hint or the answer if you are stuck.
    4. Go to the next lesson.

    Frequently asked questions

    Does this course run my PHP code?

    No. PHP runs on a server, not in your browser. The course uses patterns to check that your code contains what the task asks for, and shows what the model answer would print on a server. A typing mistake in your code is not detected.

    How can I run PHP myself?

    You need PHP on your computer or a web host that supports PHP. Many hosting plans include it. Put your code in a file with the .php extension and open it through the server.

    Should I learn HTML first?

    It helps. PHP often builds HTML, and knowing tags and pages makes the lessons clearer. There is an HTML and CSS course on this site.

    Is my code saved?

    Only which lessons you finished is saved, in this browser. The code you type is not stored or sent anywhere.

    Guides

    Related tools