Windows 10/11
Runs on x64 PCs
PHP Trail 2.9.22 is a Windows agent that writes small PHP files into your own folder, runs them and shows each result, so you practice by building real projects.
*.php0 filestable.phpsavedphp -l table.phpexit 0php table.phpexit 0table.php+1 -0Runs on x64 PCs
Released 28 Oct 2026
The installer program
One single .exe file
Inside the app
To run the app
A PHP tutorial here is a small project you build, not a lesson you watch. You describe the task, PHP Trail writes the file into your folder, runs your PHP command and shows the real output or error message, and you decide whether to accept each change. Projects stay small. A first script such as a times table needs about 10 lines.
Open an empty folder, choose Ask first and ask for a times table of 5 in a file called table.php. PHP Trail looks at the folder with list_dir, then write_file saves the new script: a short loop that echoes one product per line. Shell runs php -l table.php to check the syntax and php table.php to print the result. The output is real. Ask first pauses before the file is saved, so you read it and accept or reject it. If you want a different table, change the number in your prompt and run it again.
list_dir . → empty
write_file table.php → saved
Shell php -l table.php → exit 0
Shell php table.php → exit 0Suppose guestbook.php stops with a parse error and you cannot see why. Shell runs php -l guestbook.php and returns the real error message with a line number, then read_file opens that part of the file. A missing semicolon is a common cause. The message names 1 line. edit_file proposes the fix as a diff, and in Ask first mode you read the change and accept it before it is applied. Shell then runs the syntax check again, and a successful exit code means PHP found no syntax problem. That does not prove the guestbook behaves correctly, so you still run it and test it yourself.
Shell php -l guestbook.php → exit 255
read_file guestbook.php → read
edit_file guestbook.php → +1 -1
Shell php -l guestbook.php → exit 0To practice object-oriented programming, start in Plan only and ask for a Product class with a private name, a private price, a constructor and a method that returns a label. The agent explains the constructor and the public and private keywords, then writes a plan and runs nothing. Nothing is saved yet. Switch to Ask first to carry the plan out: write_file saves Product.php with a few lines at the bottom that create 3 products with new, and Shell runs php Product.php so each label appears. Read every diff before you accept it.
Put a small scores.csv in the folder and ask PHP Trail to total one column. read_file reads the CSV so the agent sees its columns, then write_file saves read_csv.php, which loads each line with str_getcsv and adds the numbers with array_sum. Shell runs the script. It prints the total, and if the number looks wrong, grep finds the line that reads the column, and edit_file shows the correction as a diff. Arrays, loops and 2 built-in functions are the PHP basics at work. Open scores.csv yourself to confirm the total, because the agent can misread a column.
Chat assistants answer in text. PHP Trail version 2.9.22 goes further: it creates the files, runs your PHP command and shows you the result of every step in a card you can open.
| Typical chat assistant | PHP Trail | |
|---|---|---|
| Files | Shows code that you copy and paste yourself | Saves files in your folder; in Ask first, only after you accept |
| Running | Usually describes what the output should look like | Runs your PHP command and shows the real output |
| Errors | Explains an error from the snippet you paste | Shows the real message and line from php -l |
| Review | You compare old and new code by eye | Ask first shows each edit as a diff to accept |
Beginners who have read a PHP tutorial for beginners but still freeze at an empty file are the first group. One way to get out of tutorial hell is to build something small, run it and read the real result. Keep the script short. About 10 lines is enough for a first try, and the folder it lives in stays yours.
Self-taught developers who already know another language and want to move to PHP are the second group. Recommendations for learning PHP often point to the manual, and PHP Trail can read that manual with web_search and http_get while it writes your examples. Compare with the manual.
Practitioners returning to PHP after a break are the third group. After a break, getting started with PHP again is easier when one resource stays open beside your work, and the agent keeps the manual a few tool calls away while you rebuild a habit such as escaping output. Review each diff. The approval mode you pick decides how often it stops to ask.
A practice project that you build in your own folder with an AI agent that writes, runs and explains small PHP files. PHP Trail is not a course, quiz or video lesson, and each step appears as a card with its real result. You review each card.
Yes, phptutorials.net is the official PHP Trail website. Download the original build from the download page, compare its SHA-256 checksum with the published manifest, and use the Send feedback button inside the app if anything looks wrong. Check the hash first.
Yes, for many learners it is a reasonable first language, because a PHP file is plain text that you run with one command and read the result of straight away. It is known mainly for server-side web work. Basics come first. SQL follows later.
No. PHP Trail is an AI agent for Windows that works in your own project folder, so there are no graded quizzes, videos or certificates to finish. It writes and runs files with you and shows every result. Nothing is graded.
Yes. PHP Trail runs your PHP command, so PHP must be installed on your PC; get it from the PHP website and check it by running php -v in a terminal. If php -v prints a version, your PHP command is ready. Run php -v first.
They are the three approval modes. Auto-run lets actions run immediately, Ask first pauses before an action that changes something and shows edits as a diff, and Plan only writes a plan and runs nothing until you switch mode. Pick Ask first for practice.
Yes, if you choose a cloud model: the prompt text, including any file text the agent reads, goes to that provider. With a local model nothing leaves the PC. The app keeps chats, working folders and API keys on your PC. Choose before pasting secrets.
Install PHP Trail on Windows 10 or 11 and turn your next PHP lessons into small files that you run, read and change yourself. The setup is about 34 MB. No account needed.
Download PHP Trail for Windows ↗Every page is available in 20 languages.
What PHP Trail does for practice projects ↗ Connect a cloud, local or built-in model ↗ A worked example with a small class ↗ Download and verify the Windows build ↗ Answers to common questions ↗ What this site and the app store ↗