Skip to content

Language: false[]= auto-vivifies like null (#22650)#22667

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-22650-false-append-promote
Jul 23, 2026
Merged

Language: false[]= auto-vivifies like null (#22650)#22667
PurHur merged 1 commit into
masterfrom
agent/issue-22650-false-append-promote

Conversation

@PurHur

@PurHur PurHur commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: Zend/zend_execute.c dim write / auto-conversion
PHP impl: lib/VM/TypeCheck.php, lib/VM.php, lib/JIT.php, lib/JIT/HashTableWriteLlvm.php

Test plan

  • Issue repro VM:
php bin/vm.php test/repro/maintainer_gap_false_append_promotes_array.php
# array ( 0 => 1, ) / array
  • Targeted compliance (VM+JIT):
./script/phpunit.sh --filter 'append_false_promotes_array|append_scalar_bool_error|coalesce_assign_dim_null_autovivify'
# OK (6 tests, 6 assertions)

Gate snapshot (pre-claim): inventory OK 6454/6454; user_release_ready: no — north-star5-fast 4f-m gen-0 fingerprint (#8713); unrelated to this language fix.

Made with Cursor

Match Zend/zend_execute.c: dim-write on false promotes to [] (same as null);
true/int/float still raise Cannot use a scalar value as an array.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 4fc3b9f into master Jul 23, 2026
@PurHur
PurHur deleted the agent/issue-22650-false-append-promote branch July 23, 2026 13:45
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: $false[] = $v fatals — Zend promotes false to array like null (Zend/zend_execute.c)

1 participant