Stdlib: memory_get_usage/peak(null) TypeError under strict_types (#30346) - #30365
Merged
Merged
Conversation
PurHur
added a commit
that referenced
this pull request
Aug 11, 2026
…0371) Re-emit and publish the x86_64-linux helper-runtime corpus so check-helper-runtime-prelink --strict reports 0 stale (Pillar 1). Also refresh SocketAtmark/SocketCreate/Memory units that went stale on rebase onto master (#30365–#30369). Co-authored-by: PurHur <PurHur@users.noreply.github.com> 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
strict_typesformemory_get_usage()/memory_get_peak_usage()$real_usage(Z_PARAM_BOOL) so literal/runtimenullthrows Zend-matchingTypeErrorinstead of soft DEP+int.VmMath::parseBoolBuiltinArgForFrameafter MemoryUsage enum handling (ext/standard/VmMemory.php).JitBoolArg::lowerCoerceZParamBoolfor soft null (lib/JIT/JitMemoryUsageArg.php).false/ int usage (existing#21615case).ext/standard/basic_functions.c/.stub.php—memory_get_usage(bool $real_usage = false): int.Closes #30346
Test plan
php bin/vm.php test/repro/issue_30346_memory_get_usage_null_strict.php./phpc build -o /tmp/mgu_null_strict test/repro/issue_30346_memory_get_usage_null_strict.php && /tmp/mgu_null_strictissue_21615_memory_usage_null.php+ soft AOT one-linervendor/bin/phpunit -c phpunit.xml.dist --filter MemoryGetUsageNullStrict(VM+JIT compliance + unit)Verification transcript (Docker
php-compiler:22.04-dev)Pillar probe before claim:
north-star5-fastok;helper-runtime-prelinkred on stale DOM helpers (pre-existing, unrelated); inventory construct-flag doc drift only.Made with Cursor