diff --git a/packages/php-wasm/compile/php/php_wasm.c b/packages/php-wasm/compile/php/php_wasm.c index ff8d510c20..52e39992c0 100644 --- a/packages/php-wasm/compile/php/php_wasm.c +++ b/packages/php-wasm/compile/php/php_wasm.c @@ -1272,6 +1272,8 @@ int EMSCRIPTEN_KEEPALIVE wasm_sapi_handle_request() result = -1; goto wasm_request_done; } + + EG(exit_status) = 0; TSRMLS_FETCH(); if (wasm_server_context->execution_mode == MODE_EXECUTE_SCRIPT) diff --git a/packages/php-wasm/node/public/7_0_33/php_7_0.wasm b/packages/php-wasm/node/public/7_0_33/php_7_0.wasm index 984b583a9c..57e1f4edc8 100755 Binary files a/packages/php-wasm/node/public/7_0_33/php_7_0.wasm and b/packages/php-wasm/node/public/7_0_33/php_7_0.wasm differ diff --git a/packages/php-wasm/node/public/7_1_30/php_7_1.wasm b/packages/php-wasm/node/public/7_1_30/php_7_1.wasm index 0d40645876..459be76c17 100755 Binary files a/packages/php-wasm/node/public/7_1_30/php_7_1.wasm and b/packages/php-wasm/node/public/7_1_30/php_7_1.wasm differ diff --git a/packages/php-wasm/node/public/7_2_34/php_7_2.wasm b/packages/php-wasm/node/public/7_2_34/php_7_2.wasm index 54f1d25d17..4aaf0f8353 100755 Binary files a/packages/php-wasm/node/public/7_2_34/php_7_2.wasm and b/packages/php-wasm/node/public/7_2_34/php_7_2.wasm differ diff --git a/packages/php-wasm/node/public/7_3_33/php_7_3.wasm b/packages/php-wasm/node/public/7_3_33/php_7_3.wasm index 06f8532935..d7479c8d01 100755 Binary files a/packages/php-wasm/node/public/7_3_33/php_7_3.wasm and b/packages/php-wasm/node/public/7_3_33/php_7_3.wasm differ diff --git a/packages/php-wasm/node/public/7_4_33/php_7_4.wasm b/packages/php-wasm/node/public/7_4_33/php_7_4.wasm index 0457de7b00..48300bcea3 100755 Binary files a/packages/php-wasm/node/public/7_4_33/php_7_4.wasm and b/packages/php-wasm/node/public/7_4_33/php_7_4.wasm differ diff --git a/packages/php-wasm/node/public/8_0_30/php_8_0.wasm b/packages/php-wasm/node/public/8_0_30/php_8_0.wasm index 8619fdeb8b..db931cfb48 100755 Binary files a/packages/php-wasm/node/public/8_0_30/php_8_0.wasm and b/packages/php-wasm/node/public/8_0_30/php_8_0.wasm differ diff --git a/packages/php-wasm/node/public/8_1_23/php_8_1.wasm b/packages/php-wasm/node/public/8_1_23/php_8_1.wasm index 2f1137f7c5..9ee2989f69 100755 Binary files a/packages/php-wasm/node/public/8_1_23/php_8_1.wasm and b/packages/php-wasm/node/public/8_1_23/php_8_1.wasm differ diff --git a/packages/php-wasm/node/public/8_2_10/php_8_2.wasm b/packages/php-wasm/node/public/8_2_10/php_8_2.wasm index 8a1e855963..7bb59697f4 100755 Binary files a/packages/php-wasm/node/public/8_2_10/php_8_2.wasm and b/packages/php-wasm/node/public/8_2_10/php_8_2.wasm differ diff --git a/packages/php-wasm/node/public/8_3_0/php_8_3.wasm b/packages/php-wasm/node/public/8_3_0/php_8_3.wasm index 5e4159351f..24639ea159 100755 Binary files a/packages/php-wasm/node/public/8_3_0/php_8_3.wasm and b/packages/php-wasm/node/public/8_3_0/php_8_3.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 8c4e7287e3..2b225b9ac1 100644 --- a/packages/php-wasm/node/public/php_7_0.js +++ b/packages/php-wasm/node/public/php_7_0.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/7_0_33/php_7_0.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 12778840; +export const dependenciesTotalSize = 12778913; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_7_1.js b/packages/php-wasm/node/public/php_7_1.js index 6329f27fb8..0f983cccd0 100644 --- a/packages/php-wasm/node/public/php_7_1.js +++ b/packages/php-wasm/node/public/php_7_1.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/7_1_30/php_7_1.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 13301175; +export const dependenciesTotalSize = 13300912; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_7_2.js b/packages/php-wasm/node/public/php_7_2.js index fc0cb0fb9c..ac54b95026 100644 --- a/packages/php-wasm/node/public/php_7_2.js +++ b/packages/php-wasm/node/public/php_7_2.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/7_2_34/php_7_2.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 13992133; +export const dependenciesTotalSize = 13992092; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_7_3.js b/packages/php-wasm/node/public/php_7_3.js index 3e283b9458..7ce8cb474e 100644 --- a/packages/php-wasm/node/public/php_7_3.js +++ b/packages/php-wasm/node/public/php_7_3.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/7_3_33/php_7_3.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 14098611; +export const dependenciesTotalSize = 14098607; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_7_4.js b/packages/php-wasm/node/public/php_7_4.js index bf6df817e9..be7469d586 100644 --- a/packages/php-wasm/node/public/php_7_4.js +++ b/packages/php-wasm/node/public/php_7_4.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/7_4_33/php_7_4.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 14331012; +export const dependenciesTotalSize = 14331074; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_8_0.js b/packages/php-wasm/node/public/php_8_0.js index ddb649b88c..752ebc8458 100644 --- a/packages/php-wasm/node/public/php_8_0.js +++ b/packages/php-wasm/node/public/php_8_0.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/8_0_30/php_8_0.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 13597816; +export const dependenciesTotalSize = 13597709; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_8_1.js b/packages/php-wasm/node/public/php_8_1.js index c64bb1bef6..6665b6900d 100644 --- a/packages/php-wasm/node/public/php_8_1.js +++ b/packages/php-wasm/node/public/php_8_1.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/8_1_23/php_8_1.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 13575986; +export const dependenciesTotalSize = 13575971; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/public/php_8_3.js b/packages/php-wasm/node/public/php_8_3.js index fc594a5455..fb1265e224 100644 --- a/packages/php-wasm/node/public/php_8_3.js +++ b/packages/php-wasm/node/public/php_8_3.js @@ -1,6 +1,6 @@ const dependencyFilename = __dirname + '/8_3_0/php_8_3.wasm'; export { dependencyFilename }; -export const dependenciesTotalSize = 14212810; +export const dependenciesTotalSize = 14212793; export function init(RuntimeName, PHPLoader) { /** * Overrides Emscripten's default ExitStatus object which gets diff --git a/packages/php-wasm/node/src/test/php.spec.ts b/packages/php-wasm/node/src/test/php.spec.ts index 05fa5df57d..2551e519b1 100644 --- a/packages/php-wasm/node/src/test/php.spec.ts +++ b/packages/php-wasm/node/src/test/php.spec.ts @@ -952,6 +952,27 @@ describe.each(SupportedPHPVersions)('PHP %s', (phpVersion) => { }); expect(result2.exitCode).toBe(0); + const promise3 = php.run({ + code: ' { + const promise1 = php.run({ + code: '