Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/configure-alpine/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ runs:
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/configure-gentoo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ runs:
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/configure-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ runs:
--with-gmp="$BREW_OPT"/gmp \
--with-iconv="$BREW_OPT"/libiconv \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
--enable-sysvmsg \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/configure-x32/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ runs:
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
--enable-sysvmsg \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/configure-x64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ runs:
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/freebsd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ runs:
--with-openssl \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
--with-ffi \
Expand Down
1 change: 1 addition & 0 deletions .github/actions/solaris/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ runs:
--enable-sockets \
--with-openssl \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
--enable-zend-test \
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/windows/build_task.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if "%CLANG_TOOLSET%" equ "1" (

cmd /c configure.bat ^
--enable-snapshot-build ^
--enable-strmatch ^
--disable-debug-pack ^
--without-analyzer ^
--enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ jobs:
--disable-mbregex \
--enable-sockets \
--enable-bcmath \
--enable-strmatch \
--enable-calendar \
--enable-ftp \
--enable-zend-test \
Expand Down
11 changes: 11 additions & 0 deletions ext/strmatch/config.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PHP_ARG_ENABLE([strmatch],
[whether to enable strmatch support],
[AS_HELP_STRING([--enable-strmatch],
[Enable multi-pattern string matching (Str\Matcher / Str\Replacer)])],
[no])

AS_VAR_IF([PHP_STRMATCH], [no],, [
AC_DEFINE([HAVE_STRMATCH], [1],
[Define to 1 if the PHP extension strmatch is available.])
PHP_NEW_EXTENSION([strmatch], [strmatch.c], [$ext_shared])
])
6 changes: 6 additions & 0 deletions ext/strmatch/config.w32
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG_ENABLE("strmatch", "multi-pattern string matching support", "no");

if (PHP_STRMATCH != "no") {
AC_DEFINE("HAVE_STRMATCH", 1, "Whether strmatch is enabled");
EXTENSION("strmatch", "strmatch.c");
}
25 changes: 25 additions & 0 deletions ext/strmatch/php_strmatch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
+----------------------------------------------------------------------+
| Copyright © The PHP Group and Contributors. |
+----------------------------------------------------------------------+
| This source file is subject to the Modified BSD License that is |
| bundled with this package in the file LICENSE, and is available |
| through the World Wide Web at <https://www.php.net/license/>. |
| |
| SPDX-License-Identifier: BSD-3-Clause |
+----------------------------------------------------------------------+
| Author: Artem Ukrainskiy <art.ukrainskiy@gmail.com> |
+----------------------------------------------------------------------+
*/

#ifndef PHP_STRMATCH_H
#define PHP_STRMATCH_H

#include "php.h"

extern zend_module_entry strmatch_module_entry;
#define phpext_strmatch_ptr &strmatch_module_entry

#define PHP_STRMATCH_VERSION "0.9-dev"

#endif /* PHP_STRMATCH_H */
Loading
Loading