Skip to content

Stdlib: strict_types null operands — password/microtime/date (#17050–#17052) - #17053

Merged
PurHur merged 2 commits into
masterfrom
agent/advanced-stdlib-strict-null-batch-17050
Jul 7, 2026
Merged

PurHur merged 2 commits into
masterfrom
agent/advanced-stdlib-strict-null-batch-17050

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #17050
Closes #17051
Closes #17049
Closes #17052

php-src reference

  • ext/standard/password.c — password_hash / password_verify
  • ext/standard/microtime.c — microtime
  • ext/date/php_date.c — date_create_from_format

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
for r in \
  test/repro/maintainer_gap_password_hash_null.php \
  test/repro/maintainer_gap_password_verify_null_strict.php \
  test/repro/maintainer_gap_microtime_null_strict.php \
  test/repro/maintainer_gap_date_create_from_format_null_strict.php; do
  echo "== $r =="; php bin/vm.php "$r"
done
php vendor/bin/phpunit --filter "password_hash_null_strict|password_verify_null_strict|microtime_null_strict|date_create_from_format_null_strict" test/compliance/
# OK (21 tests, 21 assertions)
php bin/vm.php test/compliance/cases/stdlib/password_hash_null_password_coerce.phpt
php bin/vm.php test/compliance/cases/stdlib/microtime_null_coerce.phpt
# non-strict coercion regressions green
'

Made with Cursor

PurHur and others added 2 commits July 7, 2026 00:30
–#17052)

Wire stringBuiltinArgForFrame and bool strict-or-coercible lowering so
declare(strict_types=1) rejects null operands on password_hash/verify,
microtime, and date_create_from_format while non-strict coercion stays intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
…date batch

Keep master's lowerZParamBool/parseBoolBuiltinArgForFrame for microtime;
retain password_hash/verify and date_create_from_format strict null fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment