This chapter builds the right foundations.
You will distinguish AML, PHPAML, and the runtime, install the official tool, verify the machine, choose a project type, and run it. Every command is explained before it is used.
Before you begin
You need Windows 10/11 x64, an Apple Silicon Mac, or Debian/Ubuntu x64, an internet connection, and a terminal. AML includes PHP 8.4 and Composer: no separate PHP, Composer, or Node.js installation is required.
At the end, aml doctor is healthy and your project responds in the browser at a local address.
Three different roles
The command that creates, verifies, runs, tests, and updates projects.
The framework that structures the application, routes, and responses.
The private, rebuildable environment. Your code stays in src/.
UNDERSTAND BEFORE ACTING
What happens when you open a page?
A Web application does not run by double-clicking a source file. The browser sends a request to a server. PHPAML receives it, finds the matching route, executes your PHP code, and returns a response. The browser displays that response.
GET /finds the route and runs PHP
HTTP 200We start a local server with aml serve to simulate this conversation on your computer. “Local” means that the site is available from your machine, not yet from the Internet.
SUMMARY
What to remember
- AML is the terminal tool.
- PHPAML runs and structures the application.
- runtime/ contains the rebuildable engine, not your application logic.
- The local server connects the browser to your PHP code.