You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Small PHP apps read/write files for HTML templates, config, and logs. Today only VM host calls file_get_contents in bin/serve.php; user PHP has no fopen/file_put_contents in the compiler stdlib.
#62 covers file_get_contents; #171 covers streaming via readfile.
Goal
Implement a minimal, safe file I/O subset for web apps (read/write text files under a configurable root).
Tasks
VM builtins: fopen, fread, fwrite, fclose, file_put_contents, file_exists, is_file, is_dir
Resource type in VM (Variable::TYPE_RESOURCE) or simplify to path strings + internal handles
JIT/AOT: start VM-only; document in capability matrix
Problem
Small PHP apps read/write files for HTML templates, config, and logs. Today only VM host calls
file_get_contentsinbin/serve.php; user PHP has nofopen/file_put_contentsin the compiler stdlib.#62 covers
file_get_contents; #171 covers streaming viareadfile.Goal
Implement a minimal, safe file I/O subset for web apps (read/write text files under a configurable root).
Tasks
fopen,fread,fwrite,fclose,file_put_contents,file_exists,is_file,is_dirVariable::TYPE_RESOURCE) or simplify to path strings + internal handlespublic/orphpc.jsonroot (DevEx: phpc.json project manifest (entry, includes, public assets) #106)@suppression, warnings on missing fileAcceptance criteria
Runs in VM; JIT/AOT documented as follow-up.
Dependencies
__DIR__for multi-file appsFiles
ext/standard/new modules,lib/VM.php,docs/capabilities.md