titpetric/phpscript

phpscript - an inter-operable PHP syntax VM written in Go (no CGO).

Go

11

443 commits

updated Sep 16, 2026

See the code

See what people are saying (1)

SourceMessageScoreDate

goqu: go quality index (r/golang)

I've been working on a concept idea (among many other ideas) of a richer quality index of go packages. It is based on a custom linter of mine, which it turn is somewhat of a merge of several linters i made during the last 3-5 years, as well as an abandoned go doc concept project. The conceptual…

8

Sep 15, 2026

README

phpscript - A custom PHP-flavoured runtime written in Go

This is a PHP interpreter written in Go. It supports the basic php expression syntax and some parts of the standard library. It's currently rudimentary and only enables limited functionality.

Current state

Behaviour is settled by .phpt fixtures: each one is written by running the source through real php first, and phpscript test tests/fixtures/... checks the runtime against that output. The generated test fixture results hold the per-fixture matrix; the bird's-eye view per area:

AreaFixturesPassedFailed
tests/fixtures/arithmetic21210
tests/fixtures/arrays18180
tests/fixtures/autoloading880
tests/fixtures/bindings23230
tests/fixtures/errors220
tests/fixtures/exceptions990
tests/fixtures/flatstack770
tests/fixtures/functions990
tests/fixtures/gd770
tests/fixtures/includes330
tests/fixtures/namespaces220
tests/fixtures/oop24240
tests/fixtures/output440
tests/fixtures/paths220
tests/fixtures/regex770
tests/fixtures/runtime11110
tests/fixtures/stdlib17170
tests/fixtures/strings15150
tests/fixtures/syntax880
Total1971970

The Go test run collects a coverage profile, and atkins cover renders it into the generated code coverage report, per package, with the detail per file. The dbadmin demo is measured the same way from a running server, in dbadmin.md.

Building a docker image

You can build a docker image from source as follows:

CGO_ENABLED=0 go build -o bin/ .
docker build -t titpetric/phpscript:latest -f docker/Dockerfile .

See ./compose.yml for usage.

Contributing

Contributions welcome. Open an issue to discuss before opening PRs.

Contributors

titpetric

433 commits

hazyhaar

10 commits

titpetric/phpscript

phpscript - an inter-operable PHP syntax VM written in Go (no CGO).

Go

11

443 commits

updated Sep 16, 2026

See the code

See what people are saying (1)

SourceMessageScoreDate

goqu: go quality index (r/golang)

I've been working on a concept idea (among many other ideas) of a richer quality index of go packages. It is based on a custom linter of mine, which it turn is somewhat of a merge of several linters i made during the last 3-5 years, as well as an abandoned go doc concept project. The conceptual…

8

Sep 15, 2026

README

phpscript - A custom PHP-flavoured runtime written in Go

This is a PHP interpreter written in Go. It supports the basic php expression syntax and some parts of the standard library. It's currently rudimentary and only enables limited functionality.

Current state

Behaviour is settled by .phpt fixtures: each one is written by running the source through real php first, and phpscript test tests/fixtures/... checks the runtime against that output. The generated test fixture results hold the per-fixture matrix; the bird's-eye view per area:

AreaFixturesPassedFailed
tests/fixtures/arithmetic21210
tests/fixtures/arrays18180
tests/fixtures/autoloading880
tests/fixtures/bindings23230
tests/fixtures/errors220
tests/fixtures/exceptions990
tests/fixtures/flatstack770
tests/fixtures/functions990
tests/fixtures/gd770
tests/fixtures/includes330
tests/fixtures/namespaces220
tests/fixtures/oop24240
tests/fixtures/output440
tests/fixtures/paths220
tests/fixtures/regex770
tests/fixtures/runtime11110
tests/fixtures/stdlib17170
tests/fixtures/strings15150
tests/fixtures/syntax880
Total1971970

The Go test run collects a coverage profile, and atkins cover renders it into the generated code coverage report, per package, with the detail per file. The dbadmin demo is measured the same way from a running server, in dbadmin.md.

Building a docker image

You can build a docker image from source as follows:

CGO_ENABLED=0 go build -o bin/ .
docker build -t titpetric/phpscript:latest -f docker/Dockerfile .

See ./compose.yml for usage.

Contributing

Contributions welcome. Open an issue to discuss before opening PRs.

Contributors

titpetric

433 commits

hazyhaar

10 commits

Languages

Go

100.0%