HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
z7zmey
php-parser
Go2018–2024
z7zmey / php-parser

php-parser

PHP parser written in Go

4Distinct people
8Mentions
0Explicit recommenders
959GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

PHP parser written in Go

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 7:56:55 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2018-02-07 10:51:04 UTC to 2024-09-15 06:15:41 UTC.

02462018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 7 mentions; 6 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC761
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

7 sources
> What is the purpose of this? Just static analysis? I'm not sure about the "Just" here. The opportunities for writing code transformation tools are abundant. E.g. a PHP IDE that isn't written in PHP, a linting tool, a preprocessor for an embedded DSL. It isn't obvious to me that the tooling for a language like PHP need to be written in PHP. > Why Go? Go isn't a bad choice for writing parts of a compiler. The parser itself was, however, written with the parser generator goyacc rather than native Go code: https://github.com/z7zmey/php-parser/blob/master/php7/php7.y Taking a goyacc file like this and porting it to another YACC is a lower effort than starting from scratch. In such a way, this project delivers not just "a PHP parser with xx% coverage in Go", but a shortcut to writing PHP parsers in any language with a decent YACC. One way thi
Read the rest
s project is structured that I don't particularly like is that each node in the AST corresponds to a file. For a programming language with algebraic types (ML, Haskell), having the AST definition in a single file is quite typical. https://github.com/z7zmey/php-parser/tree/master/node/expr
In Php-parser written in golang v0.3 is released

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.