Problem
Modern PHP web code uses return types:
function slug(string $s): string { ... }
#55 covers non-void returns in JIT; this issue adds declared return type checking/coercion per strict_types (#156).
Goal
Honor : return types on user functions in VM; JIT emits typed returns where possible.
Tasks
Acceptance criteria
Returning wrong type throws TypeError when strict_types enabled.
Dependencies
Files
lib/Compiler.php, lib/VM.php, lib/JIT.php
Problem
Modern PHP web code uses return types:
#55 covers non-void returns in JIT; this issue adds declared return type checking/coercion per
strict_types(#156).Goal
Honor
:return types on user functions in VM; JIT emits typed returns where possible.Tasks
PHPCfg\FuncincompileFunctionTYPE_RETURNstrict_types=1(): voidexplicitAcceptance criteria
Returning wrong type throws
TypeErrorwhen strict_types enabled.Dependencies
Files
lib/Compiler.php,lib/VM.php,lib/JIT.php