From ccc62145d5ca22d22ff01bf387d6fd3d27ab87b5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 01:31:45 +0900 Subject: feat(port): port Intervals.php Add Clone derives to Constraint, Interval, and DevConstraintSet (needed for IntervalCollection). Add preg_match/preg_replace/preg_split stubs to shirabe-php-shim. Co-Authored-By: Claude Sonnet 4.6 --- crates/shirabe-php-shim/src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 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 c95cc28..be44c6c 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -615,6 +615,22 @@ pub fn preg_quote(str: &str, delimiter: Option) -> String { todo!() } +// Returns 1 on match, 0 on no match; populates matches[0]=full match, matches[1..]=captures. +// Optional groups that did not participate in the match are stored as None. +pub fn preg_match(pattern: &str, subject: &str, matches: &mut Vec>) -> i64 { + todo!() +} + +// Returns Some(result) on success, None on error. +pub fn preg_replace(pattern: &str, replacement: &str, subject: &str) -> Option { + todo!() +} + +// Returns Some(parts) on success, None on error. +pub fn preg_split(pattern: &str, subject: &str) -> Option> { + todo!() +} + pub fn dirname(path: &str) -> String { todo!() } -- cgit v1.3.1