Files in your folder
It reads, creates and edits files inside the chat's working folder, and a counter shows files created, edited and read.
You can learn to code PHP by building small projects in your own folder while PHP Trail does the typing, the running and the checking. Every step becomes a card. It shows the real result, and in Ask first you accept or reject each change while PHP Trail reads and writes files, runs your PHP command and reads the manual.
It reads, creates and edits files inside the chat's working folder, and a counter shows files created, edited and read.
Shell runs your PHP command and reports the real output, the real error message and the real exit code.
Ask first pauses before actions that change something, and edit_file shows each change as a diff to accept or reject.
Reading cannot run a script. A PHP coding tutorial on paper stops at the text, while PHP Trail saves the file, runs your PHP command and returns the real output for you to read.
totals.phpreadarray_sum totals.php1 matchtotals.php+5 -1php -l totals.phpexit 0php totals.phpexit 0Ask for greeting.php, a page with a small HTML form that shows the submitted name back. write_file saves it with the name passed through htmlspecialchars, because form input is untrusted, and Shell runs php -l greeting.php to check the syntax. You start php -S localhost:8000 in your own terminal, since that built-in server is for local testing only and must never be exposed to the internet. Keep it local. Type a name with an angle bracket in it and see whether it appears as plain text. Learning PHP for backend development includes server-side form handling like this: input arrives, you escape it on output and you test it locally. Read the file in the Ask first card before you accept it, and test the page yourself.
Switch to Plan only, point to the foreach loop in totals.php or paste it, and ask what it does with the associative array. The agent explains each line in plain steps and writes a plan for a second loop, without running a command or changing a file. Read the plan first. Learning PHP the right way includes asking about your own code, not only about the examples in PHP learning material for beginners. When the explanation makes sense, switch to Ask first and ask for the second loop. edit_file shows the change as a diff, and Shell runs php totals.php so you can compare the printed lines with what you expected. Accept the diff only when you can say what each new line does.
PHP Trail is not a hosted service or an editor plugin. It is intended for your own files and machines, and it does not decide for you what is yours to touch. File tools work in the chat's working folder, while Shell and web tools are not limited to it. A result is not proof, so review every diff and test each script yourself.