Skip to content

Language: weak typed int TypeError on INF/NAN (#27925) - #27962

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-27925-weak-typed-int-nonfinite
Aug 6, 2026
Merged

Language: weak typed int TypeError on INF/NAN (#27925)#27962
PurHur merged 1 commit into
masterfrom
agent/issue-27925-weak-typed-int-nonfinite

Conversation

@PurHur

@PurHur PurHur commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #27925

Test plan

  • Issue repro (Zend/VM/JIT) — six TypeError lines
  • Cast path still 0
  • Finite f(1.5) still deprecates + truncates
  • TypedIntNonfiniteTypeErrorVMTest / JITTest

Verification transcript

=== VM ===
param:TypeError (×3) / return:TypeError / prop:TypeError / chr:TypeError
=== JIT ===
(same)
=== CAST ===
(int)INF → 0; intval(NAN) → 0
phpunit TypedIntNonfiniteTypeError{VM,JIT}Test → OK

Trust snapshot (pre-claim)

Made with Cursor

Match zend_dval_to_lval_safe: non-finite floats reject for typed int
params/returns/properties and Z_PARAM_LONG (chr), while (int)/intval stay 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 6cc5f88 into master Aug 6, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-27925-weak-typed-int-nonfinite branch August 6, 2026 01:18
PurHur added a commit that referenced this pull request Aug 6, 2026
#27963 stamped argv provenance from a pre-#27962 tree, leaving 4f-m red
on tip (a4fa125b9573… → cedc396a7a7d…). Rebuild bin-compile-aot on tip with
verified-fresh receipt + functional smoke.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language: weak typed int accepts INF/NAN — Zend TypeError (zend_operators.c zend_dval_to_lval_safe)

1 participant