Skip to content

Language: double-quoted string interpolation (VM) — closes #261#383

Merged
PurHur merged 1 commit into
masterfrom
issue-261-encapsed-string
May 20, 2026
Merged

Language: double-quoted string interpolation (VM) — closes #261#383
PurHur merged 1 commit into
masterfrom
issue-261-encapsed-string

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 20, 2026

Summary

  • ConcatList lowering for encapsed strings was already in lib/Compiler.php; this PR closes VM/runtime gaps for interpolation.
  • Variable::toString() now handles null, undefined, arrays, and objects for TYPE_CONCAT / echo paths.
  • Class property default values are applied in TYPE_DECLARE_PROPERTY so {$obj->prop} works.
  • Adds VM and JIT compliance PHPTs under test/compliance/cases/language/.

Closes #261

Test plan

  • vendor/bin/phpunit test/compliance/VMTest.php — 200/200 compliance OK (Docker php-compiler:22.04-dev)
  • ./script/docker-ci-local.sh — VM + serve phases OK (395 tests)
  • JIT PHPT (encapsed_string_jit.phpt) — harness bin/jit.php segfaults on MCJIT probe (pre-existing); AOT phase has 3 unrelated getenv/putenv failures on this host

Made with Cursor

…261).

ConcatList lowering was already present; close gaps for null/undefined toString,
class property defaults in encapsed braces, and PHPT coverage for VM and JIT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 2b1ac6f into master May 20, 2026
1 check passed
@PurHur PurHur deleted the issue-261-encapsed-string branch May 20, 2026 16:41
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: Double-quoted string interpolation ($var, {$obj->x})

1 participant