# valaphp-runtime-std

Native standard PHP-like runtime helpers for php2vala.

Current native package scope:

- standard/string/process helpers such as `date`, `sleep`, `usleep`, `count`,
  `trim`, `strlen`, `str_replace`, `str_starts_with`, `exec`,
  `shell_exec`, `escapeshellarg`, `sprintf`, `implode`
- stream/resource helpers such as `fopen`, `fclose`, `fread`, `fwrite`,
  `fflush`, `is_resource`, `stream_socket_client`,
  `stream_set_blocking`, `stream_select`
- regex helpers currently implemented through GLib.Regex: `preg_match`,
  `preg_match_all`, `preg_replace`, `preg_split`

Normal callable PHP functions should provide both `*_zval` and typed
`*_static`/`*_<shape>_static` ABI forms when practical. `*_zval` is needed
for opt=1/zval-first output; `*_static` is for opt=2..4 optimizer output.

Shared VALAPHP architecture notes and function status live in:

- ../../a_vala_progs/php2vala/docs/STATUS.md
- ../../a_vala_progs/php2vala/docs/NATIVE_RUNTIME_MIGRATION_2026-05-24.md
- ../../a_vala_progs/php2vala/docs/PROJECT_GUIDELINES.md
- ../../a_vala_progs/php2vala/docs/PHP_FUNCTION_OVERVIEW.md
- ../../a_vala_progs/php2vala/docs/TODO_functions.txt
