mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Add phpmicro win32 mode support (#478)
* Add phpmicro win32 mode support * Bump version to 2.2.4 * Add micro win32 build tests for actions * cs-fix and update deps
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
assert(class_exists('\\DOMDocument'));
|
||||
assert(class_exists('\DOMDocument'));
|
||||
$doc = new DOMDocument();
|
||||
$doc->loadHtml('<html><head><meta charset="UTF-8"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body id="app">Hello</body></html>');
|
||||
assert($doc->getElementById('app')->nodeValue === 'Hello');
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
assert(class_exists('\\Redis'));
|
||||
assert(class_exists('\Redis'));
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
assert(class_exists('\\ZipArchive'));
|
||||
assert(class_exists('\ZipArchive'));
|
||||
|
||||
@@ -56,7 +56,7 @@ function arch2gnu(string $arch): string
|
||||
*/
|
||||
function match_pattern(string $pattern, string $subject): bool
|
||||
{
|
||||
$pattern = str_replace(['\*', '\\\\.*'], ['.*', '\*'], preg_quote($pattern, '/'));
|
||||
$pattern = str_replace(['\*', '\\\.*'], ['.*', '\*'], preg_quote($pattern, '/'));
|
||||
$pattern = '/^' . $pattern . '$/i';
|
||||
return preg_match($pattern, $subject) === 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user