Problem
lib/JIT.php throws on non-void returns:
Non-void return types not supported yet
User-defined functions with return values are required for any non-trivial app structure (helpers, routers).
Goal
Compile functions returning strings, ints, bools, arrays (per existing value types).
Tasks
Acceptance criteria
function greet(string $name): string { return 'Hello '.$name; }
echo greet('World');
works in JIT and AOT.
Files
Problem
lib/JIT.phpthrows on non-void returns:Non-void return types not supported yetUser-defined functions with return values are required for any non-trivial app structure (helpers, routers).
Goal
Compile functions returning strings, ints, bools, arrays (per existing value types).
Tasks
TYPE_RETURN/TYPE_FUNCCALL_EXEC_RETURNpaths for typed returns__value__*, strings, hashtables)Acceptance criteria
works in JIT and AOT.
Files
lib/JIT.php,lib/JIT.pre