AOT: nested $_GET/$_POST query parsing for static web apps (#200)#230
Merged
Conversation
Bracket notation (user[name]=, tags[]=) is parsed in the AOT runtime C refresh path with URL decoding, matching VM parse_str behavior. LLVM hashtable helpers support nested child tables; SuperglobalInit copies nested arrays at compile time. Docker CI installs libbsd0 so bundled LLVM loads in php:8.2-cli-bookworm. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
user[name]=Ada,tags[]=a) in the AOT runtime__superglobals__refreshpath, with URL decoding aligned to VMparse_str.__hashtable__setStringKeyHashtable,__value__read/writeHashtable, etc.) and copy nested superglobals at AOT compile time viaSuperglobalInit.libbsd0so bundled LLVM 9 loads inphp:8.2-cli-bookworm; enable Composer plugins for capability-matrix.Test plan
./script/docker-ci.sh—NestedSuperglobalsAotTestandExampleWebAotTestpass (llvm group)nested_get_params.phpt(flat key with nested QUERY_STRING)$_GET['user']['name']in LLVM (boxed array dim-fetch)Notes
VM already supports nested params (issue #200). This PR wires the same semantics into static AOT binaries when
QUERY_STRING/REQUEST_BODYare refreshed per request (phpc serve --aot). Chained$_GET['a']['b']in generated code is a separate JIT follow-up.Made with Cursor