• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nikic / PHP-Parser
93%

Build:
DEFAULT BRANCH: master
Repo Added 13 Feb 2016 10:31PM UTC
Files 271
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: master
CHANGE BRANCH
x
Reset
  • master
  • 2.x
  • 3.x
  • 4.x
  • add-get-visitors-for-node
  • attributes
  • attributes-on-constants
  • br-alias
  • br-alias-5x
  • calebdw/push-tqntykytzkvo
  • clone-all-syntax
  • clone-function
  • deprecate-double-cast
  • do-not-try-to-re-clone
  • errorHandler
  • feature/cast_kinds
  • final_param
  • fix-array-unpack-keys
  • fix-invalid-unicode-escapes
  • fix-name-context
  • fix-pretty-print-label-map
  • fix/concat-precedence-php8
  • fix/prefix-op-chain-printing
  • fix/typo-defaul-in-pretty-printing-docs
  • fix_PrettyPrinterAbstract
  • fixb
  • flag-helper-methods
  • formatPreservingPrint
  • function-named-fn
  • handle-crash-readonly-atttributed-anon
  • identifiersAsNodes
  • iter
  • list
  • list-types
  • nameString
  • orest/print-custom-raw-value
  • patch-1
  • perf-by-category-name
  • perf-comment
  • perf-escape
  • perf-read-lexer
  • perf/parser-tables-in-locals
  • phpdoc
  • prevent-param-void-type
  • promoted-param
  • reject-multi-hooked-property
  • remove-assert-get-args
  • remove-key
  • remove-useless-cast-doc
  • res
  • security/emulation-and-unicode-conformance
  • simple
  • tv-add-stmts-iterable
  • tv-array-types
  • tv-trailing-variadic
  • union-types
  • use-colon-instead-of-semicolon-for-case-statements
  • use-deprecated
  • v2.0.1
  • v2.1.0
  • v2.1.1
  • v3.0.0
  • v3.0.0alpha1
  • v3.0.0beta1
  • v3.0.0beta2
  • v3.0.1
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.1.3
  • v3.1.4
  • v3.1.5
  • v4.0.0
  • v4.0.0alpha1
  • v4.0.0alpha2
  • v4.0.0alpha3
  • v4.0.0beta1
  • v4.0.1
  • v4.0.2
  • v4.0.3
  • v4.0.4
  • v4.1.0
  • v4.1.1
  • v4.10.4
  • v4.10.5
  • v4.11.0
  • v4.12.0
  • v4.13.1
  • v4.13.2
  • v4.14.0
  • v4.15.0
  • v4.15.1
  • v4.15.2
  • v4.15.3
  • v4.15.4
  • v4.15.5
  • v4.16.0
  • v4.17.0
  • v4.17.1
  • v4.18.0
  • v4.19.0
  • v4.19.1
  • v4.19.2
  • v4.19.3
  • v4.19.4
  • v4.19.5
  • v4.2.0
  • v4.2.1
  • v4.2.2
  • v4.2.3
  • v4.2.4
  • v4.2.5
  • v4.3.0
  • v4.4.0
  • v4.5.0
  • v4.6.0
  • v4.7.0
  • v4.8.0
  • v5.0.0
  • v5.0.0alpha1
  • v5.0.0alpha2
  • v5.0.0alpha3
  • v5.0.0beta1
  • v5.0.0rc1
  • v5.0.1
  • v5.0.2
  • v5.2.0
  • v5.3.0
  • v5.3.1
  • v5.4.0
  • v5.5.0
  • v5.6.0
  • v5.6.1
  • v5.6.2
  • v5.7.0
  • v5.8.0
  • v5.9.0
  • variadic-no-trailing-comma
  • weak

27 Oct 2026 08:07PM UTC coverage: 92.931% (+0.02%) from 92.913%
40575238339

push

github

web-flow
perf: Use local variables for parser tables in ParserAbstract::doParse() (#1182)

`ParserAbstract::doParse()` reads the action and goto tables on every
iteration of its loop, and each of those reads is a property fetch
(`$this->actionBase[...]`, `$this->actionCheck[...]`,
`$this->action[...]`, ...). In the opcode dump that is 57 `FETCH_OBJ_R`
in `doParse()`.

This PR copies the tables into local variables before the loop, the same
way `$stackPos` became a local in 3bbf8d8. The tables are written only
in the constructor and `$this->tokens` only in `parse()`, so the copies
cannot go stale. State the reduce callbacks use (`tokenPos`, `semStack`,
the token start and end stacks, `errorState`) stays on the object.

53 of 53 new or added lines in 1 file covered. (100.0%)

7809 of 8403 relevant lines covered (92.93%)

236.72 hits per line

Relevant lines Covered
Build:
Build:
8403 RELEVANT LINES 7809 COVERED LINES
236.72 HITS PER LINE
Source Files on master
  • Tree
  • List 271
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
40575238339 master perf: Use local variables for parser tables in ParserAbstract::doParse() (#1182) `ParserAbstract::doParse()` reads the action and goto tables on every iteration of its loop, and each of those reads is a property fetch (`$this->actionBase[...]`, `... push 27 Oct 2026 08:08PM UTC web-flow github
92.93
37275967941 master Reject malformed Unicode escape sequences (#1176) `String_` only matches complete hexadecimal Unicode escapes, leaving malformed sequences as literal text instead of reporting an error: ```php String_::parse('"\u{zz}"'); // Before: literal \u{zz... push 05 Oct 2026 07:07AM UTC web-flow github
92.91
37275102599 master Fix integer key renumbering in constant array unpacking (#1174) `ConstExprEvaluator` uses `array_merge()` for array unpacking, which renumbers existing integer keys: ```php $expr = $parser->parse('<?php [5 => "a", ...[1, 2]];')[0]->expr; $evalua... push 05 Oct 2026 06:58AM UTC web-flow github
92.91
36698934395 master perf: Read Token::$id once per token in Lexer (#1171) `Lexer::postprocessTokens()` reads `Token::$id` twice for every token. `Token` extends the internal `PhpToken` class, so each property read is comparatively expensive. This PR reads the token... push 30 Sep 2026 09:53AM UTC web-flow github
92.91
36620900073 master perf: Read Token::$id once per token in CommentAnnotatingVisitor (#1170) The constructor of `CommentAnnotatingVisitor` scans every token to collect comment positions. `Token` extends the internal `PhpToken` class, so each property read is compara... push 29 Sep 2026 07:40PM UTC web-flow github
92.91
36472867444 master perf: Skip escape sequence processing for strings without backslashes (#1164) `String_::parse()` always ran `str_replace()` for single-quoted strings and `str_replace()` + `preg_replace_callback()` for double-quoted strings, even when the literal... push 28 Sep 2026 07:32PM UTC web-flow github
92.9
36264853140 master perf: Dispatch NameResolver::enterNode() checks using getType() (#1168) `NameResolver::enterNode()` ran every node through a single chain of ~30 `instanceof` checks This PR performs a switch over `getType()` instead, which only requires a single... push 26 Sep 2026 07:06PM UTC web-flow github
92.9
34881500592 master Cheap check first in `dereferenceLhsRequiresParens()` (#1160) Do simple bool comparison before going the more expensive route via another method call. push 14 Sep 2026 06:33PM UTC web-flow github
92.88
34775943711 master Release PHP-Parser 5.9.0 push 13 Sep 2026 06:52PM UTC nikic github
92.88
33977341968 master Implement support for partial function application Closes #1158. push 05 Sep 2026 04:16PM UTC web-flow github
92.88
See All Builds (1676)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc