Stdlib: pow, strval, and expanded PHPT specs - #6
Merged
Conversation
Add pow() and strval() for supported scalar types with VM and JIT paths, register libm pow in jitInit, and extend compliance and integration tests. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
5 tasks
PurHur
added a commit
that referenced
this pull request
Jul 28, 2026
… (Phase 2.5) (#24387) RELEASE-PLAN Phase 2.5 wants extensions to become separate, discoverable, side-loadable modules. The blocker measured in #24285: Module declares no dependencies and no default-enabled flag, so the set cannot be selected per build and the load order lives only in a hand-maintained list in Runtime::loadCoreModules(). Adds two declarations, with defaults in ModuleAbstract that preserve current behaviour exactly: getExtensionDependencies(): list<string> default [] — ordering constraints, today implicit isDefaultEnabled(): bool default true — all 76 load unconditionally now Safe to add to the interface: all 76 ext/*/Module.php extend ModuleAbstract and it is the only implementor, so nothing needs updating. Declares the libxml family, where the constraint is real and currently only remembered — php-src ext/dom, simplexml, xml, xmlreader, xmlwriter build on ext/libxml, and xsl additionally on dom: dom, simplexml, xml, xmlreader, xmlwriter -> libxml xsl -> libxml, dom A declaration nobody verifies is worse than none — it reads as authoritative while being free to drift — so script/check-extension-dependencies.php asserts every declared dependency exists, is loaded, and loads BEFORE its dependent in Runtime::loadCoreModules(). It reorders nothing; its job is to prove the declarations describe reality, which is the precondition for later deriving the order from them instead of hand-maintaining it. Validated in both directions: as declared ok — 6 extensions, 7 edges, all satisfied with dom -> xsl (xsl loads later) FAILED: dom (load #6) declares dependency "xsl" but xsl loads later at #7 exit 1 Nothing consumes isDefaultEnabled() yet. The declaration comes first so the set can be made selectable without a flag day. Gate (touches lib/Module.php and lib/ModuleAbstract.php, which every extension implements), branch vs a clean master checkout, run sequentially, both cold, waiting for each sweep to COMPLETE before diffing: cold aot-smoke : 8/8 both sides VM --repeat 2 : 110/110 both sides, exit 0 AOT --repeat 3 : master 18 failing, branch 18 failing regressions (branch-only): NONE fixed (master-only) : NONE Co-authored-by: PurHur <tedyyyyy@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
4 tasks
PurHur
added a commit
that referenced
this pull request
Aug 7, 2026
…8798) (#28802) Emit userland TypeError from ExceptionSupport::setExceptionPrevious for non-Throwable $previous (Exception/Error arg #3, ErrorException #6), and validate/store previous in the JIT ExceptionConstruct path. Co-authored-by: PurHur <PurHur@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Sep 2, 2026
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
pow()for two integer or float arguments (VM + JIT via libm).strval()for null, bool, int, float, and string scalars (VM + JIT).powandstrval, plus integration tests.Test plan
make test(CircleCI / Docker) passes VM and JIT compliance suitespow.phpt,pow_int.phpt, andstrval.phptcompliance cases passstdlib_strval_pow.phptand updatedstdlib_casts.phptintegration tests passMade with Cursor