PIPELINE
How compilation works
Builds follow a clear pipeline. When something fails, the log shows the stage, file, line, and reason so the problem can be fixed without guessing.
Parse
The compiler reads the entrypoint and PHP files, validates syntax, and builds the program tree.
Autoload
Composer maps and project classes are loaded; unused files are kept out where analysis can prove it.
Analyze
Types, reachable code, calls, properties, arrays, superglobals, and possible runtime fallbacks are analyzed.
Generate Go
PHP constructs become Go: direct calls, typed locals, fast array/string helpers, and runtime only where PHP semantics require it.
Go build
The generated project is compiled with standard go build into a binary.
Artifact
The result is packaged with manifest, checksum, logs, and README_RUN.
How to read log stages
Parse means syntax or require, FinalCheck means unknown classes/functions, Codegen means Go generation, and GoBuild means an error in the generated Go project.
php2go: stage=Analyze static analysis
php2go: stage=Codegen generate Go
php2go: stage=GoBuild command=go build -mod=mod
compile_report: ok