From 78eb6205ccee4b8b0094b6cba7a852bb1b3a9162 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 16 May 2026 14:46:30 +0900 Subject: feat(port): port Platform.php --- crates/shirabe-php-shim/src/lib.rs | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) (limited to 'crates/shirabe-php-shim') diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index cefe46a..c3547a8 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -853,6 +853,100 @@ pub fn abs(value: i64) -> i64 { todo!() } +pub fn str_contains(haystack: &str, needle: &str) -> bool { + todo!() +} + +pub fn usleep(microseconds: u64) { + todo!() +} + +pub fn mb_strlen(s: &str, encoding: &str) -> i64 { + todo!() +} + +pub fn strlen(s: &str) -> i64 { + todo!() +} + +pub fn substr(s: &str, offset: i64, length: Option) -> String { + todo!() +} + +pub fn strtoupper(s: &str) -> String { + todo!() +} + +pub fn stream_isatty(stream: PhpMixed) -> bool { + todo!() +} + +pub fn posix_getuid() -> i64 { + todo!() +} + +pub fn posix_geteuid() -> i64 { + todo!() +} + +pub fn posix_getpwuid(uid: i64) -> PhpMixed { + todo!() +} + +pub fn posix_isatty(stream: PhpMixed) -> bool { + todo!() +} + +pub fn fstat(stream: PhpMixed) -> PhpMixed { + todo!() +} + +pub fn getenv(name: &str) -> Option { + todo!() +} + +pub fn putenv(setting: &str) -> bool { + todo!() +} + +/// PHP superglobal $_SERVER access +pub fn server_get(name: &str) -> Option { + todo!() +} + +pub fn server_set(name: &str, value: String) { + todo!() +} + +pub fn server_unset(name: &str) { + todo!() +} + +pub fn server_contains_key(name: &str) -> bool { + todo!() +} + +pub fn server_argv() -> Vec { + todo!() +} + +/// PHP superglobal $_ENV access +pub fn env_get(name: &str) -> Option { + todo!() +} + +pub fn env_set(name: &str, value: String) { + todo!() +} + +pub fn env_unset(name: &str) { + todo!() +} + +pub fn env_contains_key(name: &str) -> bool { + todo!() +} + impl Phar { pub const SHA512: i64 = 16; -- cgit v1.3.1