Documentation · Chapter 14

Learn PHP without a browser.

A Console project runs pure PHP in a terminal. PHPAML prepares a small, strict project so beginners can focus on variables, conditions, loops, functions, and objects.

Every lesson starts from the problem, explains the mechanism, then gives a concrete verification.

≈ 75 min

A smaller learning surface

Without HTTP, routes, HTML, or a database, execution order is visible from the first line to the last.

LESSON OBJECTIVE

What you will be able to do

Distinguish native terminal PHP from the structure PHPAML adds, then create and run a Console project.

What PHPAML adds

PHP could already run in a terminal. PHPAML adds a consistent project, aml run, autoloading, generators, diagnostics, and tests; it does not replace the PHP language.

Create the program

create-console creates Program.php and an executable project. Arguments after -- are passed to the program.

CHECKPOINT

Before you continue

Can you explain what aml run contributes without claiming PHP needed PHPAML to work in a terminal?