Stdlib: null operand coercion parity batch (#18369–#18378)#18385
Merged
PurHur merged 2 commits intoJul 12, 2026
Conversation
Add InternalStrictArg::resolveCoercibleStringArg for Z_PARAM_STR parity outside declare(strict_types=1), fixing strtotime/date/gmdate/preg_match/sort/rsort/mktime/ touch/unserialize/scandir/exec/popen null handling on VM and JIT paths. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 12, 2026
Closed
Closed
PurHur
added a commit
that referenced
this pull request
Jul 13, 2026
…rt (#18482) (#18485) Regression from #18385: flags operand used Variable::TYPE_INTEGER without importing PHPCompiler\VM\Variable. Restores Zend parity for offset capture. php-src: ext/pcre/php_pcre.c — PHP_FUNCTION(preg_match) 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
InternalStrictArg::resolveCoercibleStringArg()for php-src Z_PARAM_STR parity:nullcoerces to''outsidedeclare(strict_types=1), stillTypeErrorunder strict call sites..phptguards + maintainer repro scripts for each issue.php-src reference
ext/standard/datetime.c—php_date,php_gmdate,php_strtotime,php_mktimeext/pcre/php_pcre.c— subject string coercionext/standard/array.c— sort flags defaultext/standard/filestat.c,ext/standard/var.c— touch/unserialize empty inputext/standard/dir.c,ext/standard/exec.c,ext/standard/proc_open.c— empty path/commandPHP implementation
lib/VM/InternalStrictArg.php— sharedresolveCoercibleStringArg()ext/standard/{strtotime,date,gmdate,preg_match,sort_,rsort_,mktime,gmmktime,touch_,unserialize,scandir,exec,popen}.php+ matching JIT helpersVerification
Closes #18378
Closes #18377
Closes #18376
Closes #18375
Closes #18370
Closes #18369
Closes #18371
Made with Cursor