diff options
Diffstat (limited to 'oracles/base.php')
-rw-r--r-- | oracles/base.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/oracles/base.php b/oracles/base.php index 45747fc..84299fd 100644 --- a/oracles/base.php +++ b/oracles/base.php @@ -21,4 +21,16 @@ abstract class oracle { return ""; } } +// backwards compatibility +if (!function_exists('str_starts_with')) { + function str_starts_with($haystack, $needle) { + return strncmp($haystack, $needle, strlen($needle)) === 0;; + } +} +if (!function_exists('str_contains')) { + function str_contains($haystack, $needle) { + return strpos((string)$haystack, (string)$needle) !== false; + } +} + ?>
\ No newline at end of file |