diff --git a/packages/php-wasm/compile/Dockerfile b/packages/php-wasm/compile/Dockerfile index 3b346285f9..8f1eae8c06 100644 --- a/packages/php-wasm/compile/Dockerfile +++ b/packages/php-wasm/compile/Dockerfile @@ -620,7 +620,8 @@ RUN if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; \ "dynCall_viiiii",\ "dynCall_viiiiiii",\ "dynCall_viiiiiiii",'; \ - export ASYNCIFY_ONLY=$'"zend_call_known_instance_method_with_2_params",\ + export ASYNCIFY_ONLY=$'"zif_array_filter",\ +"zend_call_known_instance_method_with_2_params",\ "zend_fetch_dimension_address_read_R",\ "_zval_dtor_func_for_ptr",\ "ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER",\ diff --git a/packages/php-wasm/node/public/php_5_6.js b/packages/php-wasm/node/public/php_5_6.js index d01fe9126b..3eeec5a8a2 100755 --- a/packages/php-wasm/node/public/php_5_6.js +++ b/packages/php-wasm/node/public/php_5_6.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10176192; +export const dependenciesTotalSize = 10176855; const dependencyFilename = __dirname + '/php_5_6.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_5_6.wasm b/packages/php-wasm/node/public/php_5_6.wasm index d275832671..50bc18c1e2 100755 Binary files a/packages/php-wasm/node/public/php_5_6.wasm and b/packages/php-wasm/node/public/php_5_6.wasm differ diff --git a/packages/php-wasm/node/public/php_7_0.js b/packages/php-wasm/node/public/php_7_0.js index 8611b2ff2c..a351668637 100755 --- a/packages/php-wasm/node/public/php_7_0.js +++ b/packages/php-wasm/node/public/php_7_0.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10389492; +export const dependenciesTotalSize = 10390258; const dependencyFilename = __dirname + '/php_7_0.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_7_0.wasm b/packages/php-wasm/node/public/php_7_0.wasm index 7d575f9b7b..5d0c89bfe6 100755 Binary files a/packages/php-wasm/node/public/php_7_0.wasm and b/packages/php-wasm/node/public/php_7_0.wasm differ diff --git a/packages/php-wasm/node/public/php_7_1.js b/packages/php-wasm/node/public/php_7_1.js index 4c7f34d550..d7ae68ddf8 100755 --- a/packages/php-wasm/node/public/php_7_1.js +++ b/packages/php-wasm/node/public/php_7_1.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10583119; +export const dependenciesTotalSize = 10583885; const dependencyFilename = __dirname + '/php_7_1.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_7_1.wasm b/packages/php-wasm/node/public/php_7_1.wasm index d15082c59c..3a0fc093cf 100755 Binary files a/packages/php-wasm/node/public/php_7_1.wasm and b/packages/php-wasm/node/public/php_7_1.wasm differ diff --git a/packages/php-wasm/node/public/php_7_2.js b/packages/php-wasm/node/public/php_7_2.js index d20eb5aa3c..608fa83792 100755 --- a/packages/php-wasm/node/public/php_7_2.js +++ b/packages/php-wasm/node/public/php_7_2.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10992646; +export const dependenciesTotalSize = 10993354; const dependencyFilename = __dirname + '/php_7_2.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_7_2.wasm b/packages/php-wasm/node/public/php_7_2.wasm index 60bb645f40..6f03a54fa5 100755 Binary files a/packages/php-wasm/node/public/php_7_2.wasm and b/packages/php-wasm/node/public/php_7_2.wasm differ diff --git a/packages/php-wasm/node/public/php_7_3.js b/packages/php-wasm/node/public/php_7_3.js index 2d9ca435cf..3e0bb3d415 100755 --- a/packages/php-wasm/node/public/php_7_3.js +++ b/packages/php-wasm/node/public/php_7_3.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10916038; +export const dependenciesTotalSize = 10916624; const dependencyFilename = __dirname + '/php_7_3.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_7_3.wasm b/packages/php-wasm/node/public/php_7_3.wasm index 54f5ec24ac..81e6be7627 100755 Binary files a/packages/php-wasm/node/public/php_7_3.wasm and b/packages/php-wasm/node/public/php_7_3.wasm differ diff --git a/packages/php-wasm/node/public/php_7_4.js b/packages/php-wasm/node/public/php_7_4.js index ce97473323..8f441608c9 100644 --- a/packages/php-wasm/node/public/php_7_4.js +++ b/packages/php-wasm/node/public/php_7_4.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 11015985; +export const dependenciesTotalSize = 11016595; const dependencyFilename = __dirname + '/php_7_4.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_7_4.wasm b/packages/php-wasm/node/public/php_7_4.wasm index dc738ea490..f4d94a9f6f 100644 Binary files a/packages/php-wasm/node/public/php_7_4.wasm and b/packages/php-wasm/node/public/php_7_4.wasm differ diff --git a/packages/php-wasm/node/public/php_8_0.js b/packages/php-wasm/node/public/php_8_0.js index 2906f9f3c3..f7d70a0357 100755 --- a/packages/php-wasm/node/public/php_8_0.js +++ b/packages/php-wasm/node/public/php_8_0.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10172313; +export const dependenciesTotalSize = 10172733; const dependencyFilename = __dirname + '/php_8_0.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_8_0.wasm b/packages/php-wasm/node/public/php_8_0.wasm index f8fd7b5542..bebd10a503 100755 Binary files a/packages/php-wasm/node/public/php_8_0.wasm and b/packages/php-wasm/node/public/php_8_0.wasm differ diff --git a/packages/php-wasm/node/public/php_8_1.js b/packages/php-wasm/node/public/php_8_1.js index 930bdf3db2..471dbbaa79 100755 --- a/packages/php-wasm/node/public/php_8_1.js +++ b/packages/php-wasm/node/public/php_8_1.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10044311; +export const dependenciesTotalSize = 10044712; const dependencyFilename = __dirname + '/php_8_1.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_8_1.wasm b/packages/php-wasm/node/public/php_8_1.wasm index 784bff22b9..45e36566db 100755 Binary files a/packages/php-wasm/node/public/php_8_1.wasm and b/packages/php-wasm/node/public/php_8_1.wasm differ diff --git a/packages/php-wasm/node/public/php_8_2.js b/packages/php-wasm/node/public/php_8_2.js index ae8cbd88f9..2bc13ec3a1 100755 --- a/packages/php-wasm/node/public/php_8_2.js +++ b/packages/php-wasm/node/public/php_8_2.js @@ -1,4 +1,4 @@ -export const dependenciesTotalSize = 10302665; +export const dependenciesTotalSize = 10303111; const dependencyFilename = __dirname + '/php_8_2.wasm'; export { dependencyFilename }; export function init(RuntimeName, PHPLoader) { var Module = typeof PHPLoader != "undefined" ? PHPLoader : {}; diff --git a/packages/php-wasm/node/public/php_8_2.wasm b/packages/php-wasm/node/public/php_8_2.wasm index 248ab3424a..9e567fb5ad 100755 Binary files a/packages/php-wasm/node/public/php_8_2.wasm and b/packages/php-wasm/node/public/php_8_2.wasm differ diff --git a/packages/php-wasm/node/src/test/php-asyncify.spec.ts b/packages/php-wasm/node/src/test/php-asyncify.spec.ts index 1353cdd6d2..b43f68d028 100644 --- a/packages/php-wasm/node/src/test/php-asyncify.spec.ts +++ b/packages/php-wasm/node/src/test/php-asyncify.spec.ts @@ -74,6 +74,22 @@ describe.each(phpVersions)('PHP %s – asyncify', (phpVersion) => { )); }); + describe('Array functions', () => { + test('array_filter', () => + assertNoCrash(` + function top() { ${networkCall} } + array_filter(array('top'), 'top'); + `)); + + test('array_map', () => + assertNoCrash(` + function top() { ${networkCall} } + array_map(array('top'), 'top'); + `)); + + // Network calls in sort() would be silly so let's skip those for now. + }); + describe('Class method calls', () => { test('Regular method', () => assertNoCrash(`