@php-wasm/node 0.9.46 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/{7_0_33 → asyncify/7_0_33}/php_7_0.wasm +0 -0
  2. package/{7_1_30 → asyncify/7_1_30}/php_7_1.wasm +0 -0
  3. package/{7_2_34 → asyncify/7_2_34}/php_7_2.wasm +0 -0
  4. package/{7_3_33 → asyncify/7_3_33}/php_7_3.wasm +0 -0
  5. package/{7_4_33 → asyncify/7_4_33}/php_7_4.wasm +0 -0
  6. package/{8_0_30 → asyncify/8_0_30}/php_8_0.wasm +0 -0
  7. package/{8_1_23 → asyncify/8_1_23}/php_8_1.wasm +0 -0
  8. package/{8_2_10 → asyncify/8_2_10}/php_8_2.wasm +0 -0
  9. package/{8_3_0 → asyncify/8_3_0}/php_8_3.wasm +0 -0
  10. package/{php_7_0.js → asyncify/php_7_0.js} +273 -274
  11. package/{php_7_1.js → asyncify/php_7_1.js} +270 -271
  12. package/{php_7_2.js → asyncify/php_7_2.js} +270 -271
  13. package/{php_7_3.js → asyncify/php_7_3.js} +273 -274
  14. package/{php_7_4.js → asyncify/php_7_4.js} +273 -274
  15. package/{php_8_0.js → asyncify/php_8_0.js} +273 -274
  16. package/{php_8_1.js → asyncify/php_8_1.js} +273 -274
  17. package/{php_8_2.js → asyncify/php_8_2.js} +268 -269
  18. package/{php_8_3.js → asyncify/php_8_3.js} +269 -270
  19. package/index.cjs +65903 -2599
  20. package/index.js +65899 -2599
  21. package/jspi/7_0_33/php_7_0.wasm +0 -0
  22. package/jspi/7_1_30/php_7_1.wasm +0 -0
  23. package/jspi/7_2_34/php_7_2.wasm +0 -0
  24. package/jspi/7_3_33/php_7_3.wasm +0 -0
  25. package/jspi/7_4_33/php_7_4.wasm +0 -0
  26. package/jspi/8_0_30/php_8_0.wasm +0 -0
  27. package/jspi/8_1_23/php_8_1.wasm +0 -0
  28. package/jspi/8_2_10/php_8_2.wasm +0 -0
  29. package/jspi/8_3_0/php_8_3.wasm +0 -0
  30. package/jspi/php_7_0.js +7107 -0
  31. package/jspi/php_7_1.js +7107 -0
  32. package/jspi/php_7_2.js +7107 -0
  33. package/jspi/php_7_3.js +7107 -0
  34. package/jspi/php_7_4.js +7133 -0
  35. package/jspi/php_8_0.js +7148 -0
  36. package/jspi/php_8_1.js +7195 -0
  37. package/jspi/php_8_2.js +7202 -0
  38. package/jspi/php_8_3.js +7202 -0
  39. package/package.json +9 -8
@@ -1,6 +1,6 @@
1
1
  const dependencyFilename = __dirname + '/7_2_34/php_7_2.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 14386107;
3
+ export const dependenciesTotalSize = 14137039;
4
4
  export function init(RuntimeName, PHPLoader) {
5
5
  /**
6
6
  * Overrides Emscripten's default ExitStatus object which gets
@@ -359,6 +359,228 @@ var tempDouble;
359
359
 
360
360
  var tempI64;
361
361
 
362
+ function js_popen_to_file(command, mode, exitCodePtr) {
363
+ const returnCallback = resolver => Asyncify.handleSleep(resolver);
364
+ if (!command) return 1;
365
+ const cmdstr = UTF8ToString(command);
366
+ if (!cmdstr.length) return 0;
367
+ const modestr = UTF8ToString(mode);
368
+ if (!modestr.length) return 0;
369
+ if (modestr === "w") {
370
+ console.error('popen($cmd, "w") is not implemented yet');
371
+ }
372
+ return returnCallback(async wakeUp => {
373
+ let cp;
374
+ try {
375
+ cp = PHPWASM.spawnProcess(cmdstr, []);
376
+ if (cp instanceof Promise) {
377
+ cp = await cp;
378
+ }
379
+ } catch (e) {
380
+ console.error(e);
381
+ if (e.code === "SPAWN_UNSUPPORTED") {
382
+ return 1;
383
+ }
384
+ throw e;
385
+ }
386
+ const outByteArrays = [];
387
+ cp.stdout.on("data", function(data) {
388
+ outByteArrays.push(data);
389
+ });
390
+ const outputPath = "/tmp/popen_output";
391
+ cp.on("exit", function(exitCode) {
392
+ const outBytes = new Uint8Array(outByteArrays.reduce((acc, curr) => acc + curr.length, 0));
393
+ let offset = 0;
394
+ for (const byteArray of outByteArrays) {
395
+ outBytes.set(byteArray, offset);
396
+ offset += byteArray.length;
397
+ }
398
+ FS.writeFile(outputPath, outBytes);
399
+ HEAPU8[exitCodePtr] = exitCode;
400
+ wakeUp(allocateUTF8OnStack(outputPath));
401
+ });
402
+ });
403
+ }
404
+
405
+ function wasm_poll_socket(socketd, events, timeout) {
406
+ const returnCallback = resolver => Asyncify.handleSleep(resolver);
407
+ const POLLIN = 1;
408
+ const POLLPRI = 2;
409
+ const POLLOUT = 4;
410
+ const POLLERR = 8;
411
+ const POLLHUP = 16;
412
+ const POLLNVAL = 32;
413
+ return returnCallback(wakeUp => {
414
+ const polls = [];
415
+ if (socketd in PHPWASM.child_proc_by_fd) {
416
+ const procInfo = PHPWASM.child_proc_by_fd[socketd];
417
+ if (procInfo.exited) {
418
+ wakeUp(0);
419
+ return;
420
+ }
421
+ polls.push(PHPWASM.awaitEvent(procInfo.stdout, "data"));
422
+ } else if (FS.isSocket(FS.getStream(socketd)?.node.mode)) {
423
+ const sock = getSocketFromFD(socketd);
424
+ if (!sock) {
425
+ wakeUp(0);
426
+ return;
427
+ }
428
+ const lookingFor = new Set;
429
+ if (events & POLLIN || events & POLLPRI) {
430
+ if (sock.server) {
431
+ for (const client of sock.pending) {
432
+ if ((client.recv_queue || []).length > 0) {
433
+ wakeUp(1);
434
+ return;
435
+ }
436
+ }
437
+ } else if ((sock.recv_queue || []).length > 0) {
438
+ wakeUp(1);
439
+ return;
440
+ }
441
+ }
442
+ const webSockets = PHPWASM.getAllWebSockets(sock);
443
+ if (!webSockets.length) {
444
+ wakeUp(0);
445
+ return;
446
+ }
447
+ for (const ws of webSockets) {
448
+ if (events & POLLIN || events & POLLPRI) {
449
+ polls.push(PHPWASM.awaitData(ws));
450
+ lookingFor.add("POLLIN");
451
+ }
452
+ if (events & POLLOUT) {
453
+ polls.push(PHPWASM.awaitConnection(ws));
454
+ lookingFor.add("POLLOUT");
455
+ }
456
+ if (events & POLLHUP) {
457
+ polls.push(PHPWASM.awaitClose(ws));
458
+ lookingFor.add("POLLHUP");
459
+ }
460
+ if (events & POLLERR || events & POLLNVAL) {
461
+ polls.push(PHPWASM.awaitError(ws));
462
+ lookingFor.add("POLLERR");
463
+ }
464
+ }
465
+ } else {
466
+ setTimeout(function() {
467
+ wakeUp(1);
468
+ }, timeout);
469
+ return;
470
+ }
471
+ if (polls.length === 0) {
472
+ console.warn("Unsupported poll event " + events + ", defaulting to setTimeout().");
473
+ setTimeout(function() {
474
+ wakeUp(0);
475
+ }, timeout);
476
+ return;
477
+ }
478
+ const promises = polls.map(([promise]) => promise);
479
+ const clearPolling = () => polls.forEach(([, clear]) => clear());
480
+ let awaken = false;
481
+ let timeoutId;
482
+ Promise.race(promises).then(function(results) {
483
+ if (!awaken) {
484
+ awaken = true;
485
+ wakeUp(1);
486
+ if (timeoutId) {
487
+ clearTimeout(timeoutId);
488
+ }
489
+ clearPolling();
490
+ }
491
+ });
492
+ if (timeout !== -1) {
493
+ timeoutId = setTimeout(function() {
494
+ if (!awaken) {
495
+ awaken = true;
496
+ wakeUp(0);
497
+ clearPolling();
498
+ }
499
+ }, timeout);
500
+ }
501
+ });
502
+ }
503
+
504
+ function js_fd_read(fd, iov, iovcnt, pnum) {
505
+ const returnCallback = resolver => Asyncify.handleSleep(resolver);
506
+ if (Asyncify?.State?.Normal === undefined || Asyncify?.state === Asyncify?.State?.Normal) {
507
+ var returnCode;
508
+ var stream;
509
+ let num = 0;
510
+ try {
511
+ stream = SYSCALLS.getStreamFromFD(fd);
512
+ const num = doReadv(stream, iov, iovcnt);
513
+ HEAPU32[pnum >> 2] = num;
514
+ return 0;
515
+ } catch (e) {
516
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) {
517
+ throw e;
518
+ }
519
+ if (e.errno !== 6 || !(stream?.fd in PHPWASM.child_proc_by_fd)) {
520
+ HEAPU32[pnum >> 2] = 0;
521
+ return returnCode;
522
+ }
523
+ }
524
+ }
525
+ return returnCallback(wakeUp => {
526
+ var retries = 0;
527
+ var interval = 50;
528
+ var timeout = 5e3;
529
+ var maxRetries = timeout / interval;
530
+ function poll() {
531
+ var returnCode;
532
+ var stream;
533
+ let num;
534
+ try {
535
+ stream = SYSCALLS.getStreamFromFD(fd);
536
+ num = doReadv(stream, iov, iovcnt);
537
+ returnCode = 0;
538
+ } catch (e) {
539
+ if (typeof FS == "undefined" || !(e.name === "ErrnoError")) {
540
+ console.error(e);
541
+ throw e;
542
+ }
543
+ returnCode = e.errno;
544
+ }
545
+ const success = returnCode === 0;
546
+ const failure = (++retries > maxRetries || !(fd in PHPWASM.child_proc_by_fd) || PHPWASM.child_proc_by_fd[fd]?.exited || FS.isClosed(stream));
547
+ if (success) {
548
+ HEAPU32[pnum >> 2] = num;
549
+ wakeUp(0);
550
+ } else if (failure) {
551
+ HEAPU32[pnum >> 2] = 0;
552
+ wakeUp(returnCode === 6 ? 0 : returnCode);
553
+ } else {
554
+ setTimeout(poll, interval);
555
+ }
556
+ }
557
+ poll();
558
+ });
559
+ }
560
+
561
+ function __asyncjs__js_module_onMessage(data, response_buffer) {
562
+ return Asyncify.handleAsync(async () => {
563
+ if (Module["onMessage"]) {
564
+ const dataStr = UTF8ToString(data);
565
+ return Module["onMessage"](dataStr).then(response => {
566
+ const responseBytes = typeof response === "string" ? (new TextEncoder).encode(response) : response;
567
+ const responseSize = responseBytes.byteLength;
568
+ const responsePtr = _malloc(responseSize + 1);
569
+ HEAPU8.set(responseBytes, responsePtr);
570
+ HEAPU8[responsePtr + responseSize] = 0;
571
+ HEAPU8[response_buffer] = responsePtr;
572
+ HEAPU8[response_buffer + 1] = responsePtr >> 8;
573
+ HEAPU8[response_buffer + 2] = responsePtr >> 16;
574
+ HEAPU8[response_buffer + 3] = responsePtr >> 24;
575
+ return responseSize;
576
+ }).catch(e => {
577
+ console.error(e);
578
+ return -1;
579
+ });
580
+ }
581
+ });
582
+ }
583
+
362
584
  /** @constructor */ function ExitStatus(status) {
363
585
  this.name = "ExitStatus";
364
586
  this.message = `Program terminated with exit(${status})`;
@@ -5767,88 +5989,6 @@ function _js_create_input_device(deviceId) {
5767
5989
  return allocateUTF8OnStack(devicePath);
5768
5990
  }
5769
5991
 
5770
- function _js_fd_read(fd, iov, iovcnt, pnum) {
5771
- if (Asyncify.state === Asyncify.State.Normal) {
5772
- var returnCode;
5773
- var stream;
5774
- let num = 0;
5775
- try {
5776
- stream = SYSCALLS.getStreamFromFD(fd);
5777
- const num = doReadv(stream, iov, iovcnt);
5778
- HEAPU32[pnum >> 2] = num;
5779
- return 0;
5780
- } catch (e) {
5781
- if (typeof FS == "undefined" || !(e.name === "ErrnoError")) {
5782
- throw e;
5783
- }
5784
- if (e.errno !== 6 || !(stream?.fd in PHPWASM.child_proc_by_fd)) {
5785
- HEAPU32[pnum >> 2] = 0;
5786
- return returnCode;
5787
- }
5788
- }
5789
- }
5790
- return Asyncify.handleSleep(function(wakeUp) {
5791
- var retries = 0;
5792
- var interval = 50;
5793
- var timeout = 5e3;
5794
- var maxRetries = timeout / interval;
5795
- function poll() {
5796
- var returnCode;
5797
- var stream;
5798
- let num;
5799
- try {
5800
- stream = SYSCALLS.getStreamFromFD(fd);
5801
- num = doReadv(stream, iov, iovcnt);
5802
- returnCode = 0;
5803
- } catch (e) {
5804
- if (typeof FS == "undefined" || !(e.name === "ErrnoError")) {
5805
- console.error(e);
5806
- throw e;
5807
- }
5808
- returnCode = e.errno;
5809
- }
5810
- const success = returnCode === 0;
5811
- const failure = ++retries > maxRetries || !(fd in PHPWASM.child_proc_by_fd) || PHPWASM.child_proc_by_fd[fd]?.exited || FS.isClosed(stream);
5812
- if (success) {
5813
- HEAPU32[pnum >> 2] = num;
5814
- wakeUp(0);
5815
- } else if (failure) {
5816
- HEAPU32[pnum >> 2] = 0;
5817
- wakeUp(returnCode === 6 ? 0 : returnCode);
5818
- } else {
5819
- setTimeout(poll, interval);
5820
- }
5821
- }
5822
- poll();
5823
- });
5824
- }
5825
-
5826
- function _js_module_onMessage(data, bufPtr) {
5827
- if (typeof Asyncify === "undefined") {
5828
- return;
5829
- }
5830
- if (Module["onMessage"]) {
5831
- const dataStr = UTF8ToString(data);
5832
- return Asyncify.handleSleep(wakeUp => {
5833
- Module["onMessage"](dataStr).then(response => {
5834
- const responseBytes = typeof response === "string" ? (new TextEncoder).encode(response) : response;
5835
- const responseSize = responseBytes.byteLength;
5836
- const responsePtr = _malloc(responseSize + 1);
5837
- HEAPU8.set(responseBytes, responsePtr);
5838
- HEAPU8[responsePtr + responseSize] = 0;
5839
- HEAPU8[bufPtr] = responsePtr;
5840
- HEAPU8[bufPtr + 1] = responsePtr >> 8;
5841
- HEAPU8[bufPtr + 2] = responsePtr >> 16;
5842
- HEAPU8[bufPtr + 3] = responsePtr >> 24;
5843
- wakeUp(responseSize);
5844
- }).catch(e => {
5845
- console.error(e);
5846
- wakeUp(-1);
5847
- });
5848
- });
5849
- }
5850
- }
5851
-
5852
5992
  function _js_open_process(command, argsPtr, argsLength, descriptorsPtr, descriptorsLength, cwdPtr, cwdLength, envPtr, envLength) {
5853
5993
  if (!command) {
5854
5994
  return 1;
@@ -6007,48 +6147,6 @@ function _js_open_process(command, argsPtr, argsLength, descriptorsPtr, descript
6007
6147
  });
6008
6148
  }
6009
6149
 
6010
- function _js_popen_to_file(command, mode, exitCodePtr) {
6011
- if (!command) return 1;
6012
- const cmdstr = UTF8ToString(command);
6013
- if (!cmdstr.length) return 0;
6014
- const modestr = UTF8ToString(mode);
6015
- if (!modestr.length) return 0;
6016
- if (modestr === "w") {
6017
- console.error('popen($cmd, "w") is not implemented yet');
6018
- }
6019
- return Asyncify.handleSleep(async wakeUp => {
6020
- let cp;
6021
- try {
6022
- cp = PHPWASM.spawnProcess(cmdstr, []);
6023
- if (cp instanceof Promise) {
6024
- cp = await cp;
6025
- }
6026
- } catch (e) {
6027
- console.error(e);
6028
- if (e.code === "SPAWN_UNSUPPORTED") {
6029
- return 1;
6030
- }
6031
- throw e;
6032
- }
6033
- const outByteArrays = [];
6034
- cp.stdout.on("data", function(data) {
6035
- outByteArrays.push(data);
6036
- });
6037
- const outputPath = "/tmp/popen_output";
6038
- cp.on("exit", function(exitCode) {
6039
- const outBytes = new Uint8Array(outByteArrays.reduce((acc, curr) => acc + curr.length, 0));
6040
- let offset = 0;
6041
- for (const byteArray of outByteArrays) {
6042
- outBytes.set(byteArray, offset);
6043
- offset += byteArray.length;
6044
- }
6045
- FS.writeFile(outputPath, outBytes);
6046
- HEAPU8[exitCodePtr] = exitCode;
6047
- wakeUp(allocateUTF8OnStack(outputPath));
6048
- });
6049
- });
6050
- }
6051
-
6052
6150
  function _js_process_status(pid, exitCodePtr) {
6053
6151
  if (!PHPWASM.child_proc_by_pid[pid]) {
6054
6152
  return -1;
@@ -6532,107 +6630,6 @@ function _wasm_close(socketd) {
6532
6630
  return PHPWASM.shutdownSocket(socketd, 2);
6533
6631
  }
6534
6632
 
6535
- function _wasm_poll_socket(socketd, events, timeout) {
6536
- if (typeof Asyncify === "undefined") {
6537
- return 0;
6538
- }
6539
- const POLLIN = 1;
6540
- /* There is data to read */ const POLLPRI = 2;
6541
- /* There is urgent data to read */ const POLLOUT = 4;
6542
- /* Writing now will not block */ const POLLERR = 8;
6543
- /* Error condition */ const POLLHUP = 16;
6544
- /* Hung up */ const POLLNVAL = 32;
6545
- /* Invalid request: fd not open */ return Asyncify.handleSleep(wakeUp => {
6546
- const polls = [];
6547
- if (socketd in PHPWASM.child_proc_by_fd) {
6548
- const procInfo = PHPWASM.child_proc_by_fd[socketd];
6549
- if (procInfo.exited) {
6550
- wakeUp(0);
6551
- return;
6552
- }
6553
- polls.push(PHPWASM.awaitEvent(procInfo.stdout, "data"));
6554
- } else if (FS.isSocket(FS.getStream(socketd).node.mode)) {
6555
- const sock = getSocketFromFD(socketd);
6556
- if (!sock) {
6557
- wakeUp(0);
6558
- return;
6559
- }
6560
- const lookingFor = new Set;
6561
- if (events & POLLIN || events & POLLPRI) {
6562
- if (sock.server) {
6563
- for (const client of sock.pending) {
6564
- if ((client.recv_queue || []).length > 0) {
6565
- wakeUp(1);
6566
- return;
6567
- }
6568
- }
6569
- } else if ((sock.recv_queue || []).length > 0) {
6570
- wakeUp(1);
6571
- return;
6572
- }
6573
- }
6574
- const webSockets = PHPWASM.getAllWebSockets(sock);
6575
- if (!webSockets.length) {
6576
- wakeUp(0);
6577
- return;
6578
- }
6579
- for (const ws of webSockets) {
6580
- if (events & POLLIN || events & POLLPRI) {
6581
- polls.push(PHPWASM.awaitData(ws));
6582
- lookingFor.add("POLLIN");
6583
- }
6584
- if (events & POLLOUT) {
6585
- polls.push(PHPWASM.awaitConnection(ws));
6586
- lookingFor.add("POLLOUT");
6587
- }
6588
- if (events & POLLHUP) {
6589
- polls.push(PHPWASM.awaitClose(ws));
6590
- lookingFor.add("POLLHUP");
6591
- }
6592
- if (events & POLLERR || events & POLLNVAL) {
6593
- polls.push(PHPWASM.awaitError(ws));
6594
- lookingFor.add("POLLERR");
6595
- }
6596
- }
6597
- } else {
6598
- setTimeout(function() {
6599
- wakeUp(1);
6600
- }, timeout);
6601
- return;
6602
- }
6603
- if (polls.length === 0) {
6604
- console.warn("Unsupported poll event " + events + ", defaulting to setTimeout().");
6605
- setTimeout(function() {
6606
- wakeUp(0);
6607
- }, timeout);
6608
- return;
6609
- }
6610
- const promises = polls.map(([promise]) => promise);
6611
- const clearPolling = () => polls.forEach(([, clear]) => clear());
6612
- let awaken = false;
6613
- let timeoutId;
6614
- Promise.race(promises).then(function(results) {
6615
- if (!awaken) {
6616
- awaken = true;
6617
- wakeUp(1);
6618
- if (timeoutId) {
6619
- clearTimeout(timeoutId);
6620
- }
6621
- clearPolling();
6622
- }
6623
- });
6624
- if (timeout !== -1) {
6625
- timeoutId = setTimeout(function() {
6626
- if (!awaken) {
6627
- awaken = true;
6628
- wakeUp(0);
6629
- clearPolling();
6630
- }
6631
- }, timeout);
6632
- }
6633
- });
6634
- }
6635
-
6636
6633
  function _wasm_setsockopt(socketd, level, optionName, optionValuePtr, optionLen) {
6637
6634
  const optionValue = HEAPU8[optionValuePtr];
6638
6635
  const SOL_SOCKET = 1;
@@ -6664,7 +6661,7 @@ var runAndAbortIfError = func => {
6664
6661
 
6665
6662
  var Asyncify = {
6666
6663
  instrumentWasmImports(imports) {
6667
- var importPattern = /^(_dlopen_js|invoke_i|invoke_ii|invoke_iii|invoke_iiii|invoke_iiiii|invoke_iiiiii|invoke_iiiiiii|invoke_iiiiiiii|invoke_iiiiiiiiii|invoke_v|invoke_vi|invoke_vii|invoke_viidii|invoke_viii|invoke_viiii|invoke_viiiii|invoke_viiiiii|invoke_viiiiiii|invoke_viiiiiiiii|js_open_process|js_popen_to_file|js_fd_read|js_module_onMessage|js_waitpid|wasm_poll_socket|wasm_shutdown|__asyncjs__.*)$/;
6664
+ var importPattern = /^(_dlopen_js|invoke_i|invoke_ii|invoke_iii|invoke_iiii|invoke_iiiii|invoke_iiiiii|invoke_iiiiiii|invoke_iiiiiiii|invoke_iiiiiiiiii|invoke_v|invoke_vi|invoke_vii|invoke_viidii|invoke_viii|invoke_viiii|invoke_viiiii|invoke_viiiiii|invoke_viiiiiii|invoke_viiiiiiiii|js_open_process|_js_open_process|_asyncjs__js_open_process|js_popen_to_file|_js_popen_to_file|_asyncjs__js_popen_to_file|js_fd_read|_js_fd_read|js_module_onMessage|_js_module_onMessage|_asyncjs__js_module_onMessage|js_waitpid|_js_waitpid|_asyncjs__js_waitpid|wasm_poll_socket|_wasm_poll_socket|_asyncjs__wasm_poll_socket|wasm_shutdown|_wasm_shutdown|_asyncjs__wasm_shutdown|__asyncjs__.*)$/;
6668
6665
  for (let [x, original] of Object.entries(imports)) {
6669
6666
  if (typeof original == "function") {
6670
6667
  let isAsyncifyImport = original.isAsync || importPattern.test(x);
@@ -6923,7 +6920,8 @@ if (ENVIRONMENT_IS_NODE) {
6923
6920
  PHPWASM.init();
6924
6921
 
6925
6922
  var wasmImports = {
6926
- /** @export */ l: ___assert_fail,
6923
+ /** @export */ n: ___assert_fail,
6924
+ /** @export */ W: __asyncjs__js_module_onMessage,
6927
6925
  /** @export */ Xa: ___call_sighandler,
6928
6926
  /** @export */ Wa: ___syscall_accept4,
6929
6927
  /** @export */ Va: ___syscall_bind,
@@ -6936,7 +6934,7 @@ var wasmImports = {
6936
6934
  /** @export */ Pa: ___syscall_fchmod,
6937
6935
  /** @export */ Oa: ___syscall_fchown32,
6938
6936
  /** @export */ O: ___syscall_fchownat,
6939
- /** @export */ m: ___syscall_fcntl64,
6937
+ /** @export */ l: ___syscall_fcntl64,
6940
6938
  /** @export */ Na: ___syscall_fstat64,
6941
6939
  /** @export */ ba: ___syscall_ftruncate64,
6942
6940
  /** @export */ Ma: ___syscall_getcwd,
@@ -6983,7 +6981,7 @@ var wasmImports = {
6983
6981
  /** @export */ I: _emscripten_sleep,
6984
6982
  /** @export */ ta: _environ_get,
6985
6983
  /** @export */ sa: _environ_sizes_get,
6986
- /** @export */ o: _exit,
6984
+ /** @export */ p: _exit,
6987
6985
  /** @export */ r: _fd_close,
6988
6986
  /** @export */ L: _fd_fdstat_get,
6989
6987
  /** @export */ K: _fd_read,
@@ -6997,27 +6995,26 @@ var wasmImports = {
6997
6995
  /** @export */ i: invoke_i,
6998
6996
  /** @export */ c: invoke_ii,
6999
6997
  /** @export */ b: invoke_iii,
7000
- /** @export */ e: invoke_iiii,
6998
+ /** @export */ f: invoke_iiii,
7001
6999
  /** @export */ g: invoke_iiiii,
7002
7000
  /** @export */ q: invoke_iiiiii,
7003
- /** @export */ t: invoke_iiiiiii,
7001
+ /** @export */ u: invoke_iiiiiii,
7004
7002
  /** @export */ w: invoke_iiiiiiii,
7005
7003
  /** @export */ A: invoke_iiiiiiiiii,
7006
7004
  /** @export */ ca: invoke_jii,
7007
- /** @export */ f: invoke_v,
7005
+ /** @export */ e: invoke_v,
7008
7006
  /** @export */ a: invoke_vi,
7009
7007
  /** @export */ d: invoke_vii,
7010
7008
  /** @export */ z: invoke_viidii,
7011
7009
  /** @export */ h: invoke_viii,
7012
7010
  /** @export */ k: invoke_viiii,
7013
- /** @export */ n: invoke_viiiii,
7011
+ /** @export */ m: invoke_viiiii,
7014
7012
  /** @export */ j: invoke_viiiiii,
7015
7013
  /** @export */ y: invoke_viiiiiiiii,
7016
7014
  /** @export */ G: _js_create_input_device,
7017
- /** @export */ X: _js_fd_read,
7018
- /** @export */ W: _js_module_onMessage,
7015
+ /** @export */ X: js_fd_read,
7019
7016
  /** @export */ F: _js_open_process,
7020
- /** @export */ V: _js_popen_to_file,
7017
+ /** @export */ V: js_popen_to_file,
7021
7018
  /** @export */ U: _js_process_status,
7022
7019
  /** @export */ T: _js_waitpid,
7023
7020
  /** @export */ qa: _proc_exit,
@@ -7025,8 +7022,8 @@ var wasmImports = {
7025
7022
  /** @export */ R: _strftime_l,
7026
7023
  /** @export */ Q: _strptime,
7027
7024
  /** @export */ s: _wasm_close,
7028
- /** @export */ u: _wasm_poll_socket,
7029
- /** @export */ p: _wasm_setsockopt
7025
+ /** @export */ t: wasm_poll_socket,
7026
+ /** @export */ o: _wasm_setsockopt
7030
7027
  };
7031
7028
 
7032
7029
  var wasmExports = createWasm();
@@ -7097,67 +7094,69 @@ var _wasm_sapi_handle_request = Module["_wasm_sapi_handle_request"] = () => (_wa
7097
7094
 
7098
7095
  var _php_wasm_init = Module["_php_wasm_init"] = () => (_php_wasm_init = Module["_php_wasm_init"] = wasmExports["Eb"])();
7099
7096
 
7100
- var ___funcs_on_exit = () => (___funcs_on_exit = wasmExports["Fb"])();
7097
+ var _wasm_free = Module["_wasm_free"] = a0 => (_wasm_free = Module["_wasm_free"] = wasmExports["Fb"])(a0);
7098
+
7099
+ var ___funcs_on_exit = () => (___funcs_on_exit = wasmExports["Gb"])();
7101
7100
 
7102
- var _emscripten_builtin_memalign = (a0, a1) => (_emscripten_builtin_memalign = wasmExports["Gb"])(a0, a1);
7101
+ var _emscripten_builtin_memalign = (a0, a1) => (_emscripten_builtin_memalign = wasmExports["Hb"])(a0, a1);
7103
7102
 
7104
- var __emscripten_timeout = (a0, a1) => (__emscripten_timeout = wasmExports["Hb"])(a0, a1);
7103
+ var __emscripten_timeout = (a0, a1) => (__emscripten_timeout = wasmExports["Ib"])(a0, a1);
7105
7104
 
7106
- var _setThrew = (a0, a1) => (_setThrew = wasmExports["Ib"])(a0, a1);
7105
+ var _setThrew = (a0, a1) => (_setThrew = wasmExports["Jb"])(a0, a1);
7107
7106
 
7108
- var __emscripten_tempret_set = a0 => (__emscripten_tempret_set = wasmExports["Jb"])(a0);
7107
+ var __emscripten_tempret_set = a0 => (__emscripten_tempret_set = wasmExports["Kb"])(a0);
7109
7108
 
7110
- var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["Kb"])(a0);
7109
+ var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["Lb"])(a0);
7111
7110
 
7112
- var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["Lb"])(a0);
7111
+ var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["Mb"])(a0);
7113
7112
 
7114
- var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["Mb"])();
7113
+ var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["Nb"])();
7115
7114
 
7116
- var dynCall_vi = Module["dynCall_vi"] = (a0, a1) => (dynCall_vi = Module["dynCall_vi"] = wasmExports["Nb"])(a0, a1);
7115
+ var dynCall_vi = Module["dynCall_vi"] = (a0, a1) => (dynCall_vi = Module["dynCall_vi"] = wasmExports["Ob"])(a0, a1);
7117
7116
 
7118
- var dynCall_iiii = Module["dynCall_iiii"] = (a0, a1, a2, a3) => (dynCall_iiii = Module["dynCall_iiii"] = wasmExports["Ob"])(a0, a1, a2, a3);
7117
+ var dynCall_iiii = Module["dynCall_iiii"] = (a0, a1, a2, a3) => (dynCall_iiii = Module["dynCall_iiii"] = wasmExports["Pb"])(a0, a1, a2, a3);
7119
7118
 
7120
- var dynCall_ii = Module["dynCall_ii"] = (a0, a1) => (dynCall_ii = Module["dynCall_ii"] = wasmExports["Pb"])(a0, a1);
7119
+ var dynCall_ii = Module["dynCall_ii"] = (a0, a1) => (dynCall_ii = Module["dynCall_ii"] = wasmExports["Qb"])(a0, a1);
7121
7120
 
7122
- var dynCall_vii = Module["dynCall_vii"] = (a0, a1, a2) => (dynCall_vii = Module["dynCall_vii"] = wasmExports["Qb"])(a0, a1, a2);
7121
+ var dynCall_vii = Module["dynCall_vii"] = (a0, a1, a2) => (dynCall_vii = Module["dynCall_vii"] = wasmExports["Rb"])(a0, a1, a2);
7123
7122
 
7124
- var dynCall_viiiii = Module["dynCall_viiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viiiii = Module["dynCall_viiiii"] = wasmExports["Rb"])(a0, a1, a2, a3, a4, a5);
7123
+ var dynCall_viiiii = Module["dynCall_viiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viiiii = Module["dynCall_viiiii"] = wasmExports["Sb"])(a0, a1, a2, a3, a4, a5);
7125
7124
 
7126
- var dynCall_iii = Module["dynCall_iii"] = (a0, a1, a2) => (dynCall_iii = Module["dynCall_iii"] = wasmExports["Sb"])(a0, a1, a2);
7125
+ var dynCall_iii = Module["dynCall_iii"] = (a0, a1, a2) => (dynCall_iii = Module["dynCall_iii"] = wasmExports["Tb"])(a0, a1, a2);
7127
7126
 
7128
- var dynCall_iiiii = Module["dynCall_iiiii"] = (a0, a1, a2, a3, a4) => (dynCall_iiiii = Module["dynCall_iiiii"] = wasmExports["Tb"])(a0, a1, a2, a3, a4);
7127
+ var dynCall_iiiii = Module["dynCall_iiiii"] = (a0, a1, a2, a3, a4) => (dynCall_iiiii = Module["dynCall_iiiii"] = wasmExports["Ub"])(a0, a1, a2, a3, a4);
7129
7128
 
7130
- var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_iiiiiii = Module["dynCall_iiiiiii"] = wasmExports["Ub"])(a0, a1, a2, a3, a4, a5, a6);
7129
+ var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_iiiiiii = Module["dynCall_iiiiiii"] = wasmExports["Vb"])(a0, a1, a2, a3, a4, a5, a6);
7131
7130
 
7132
- var dynCall_iiiiii = Module["dynCall_iiiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_iiiiii = Module["dynCall_iiiiii"] = wasmExports["Vb"])(a0, a1, a2, a3, a4, a5);
7131
+ var dynCall_iiiiii = Module["dynCall_iiiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_iiiiii = Module["dynCall_iiiiii"] = wasmExports["Wb"])(a0, a1, a2, a3, a4, a5);
7133
7132
 
7134
- var dynCall_i = Module["dynCall_i"] = a0 => (dynCall_i = Module["dynCall_i"] = wasmExports["Wb"])(a0);
7133
+ var dynCall_i = Module["dynCall_i"] = a0 => (dynCall_i = Module["dynCall_i"] = wasmExports["Xb"])(a0);
7135
7134
 
7136
- var dynCall_viii = Module["dynCall_viii"] = (a0, a1, a2, a3) => (dynCall_viii = Module["dynCall_viii"] = wasmExports["Xb"])(a0, a1, a2, a3);
7135
+ var dynCall_viii = Module["dynCall_viii"] = (a0, a1, a2, a3) => (dynCall_viii = Module["dynCall_viii"] = wasmExports["Yb"])(a0, a1, a2, a3);
7137
7136
 
7138
- var dynCall_viiii = Module["dynCall_viiii"] = (a0, a1, a2, a3, a4) => (dynCall_viiii = Module["dynCall_viiii"] = wasmExports["Yb"])(a0, a1, a2, a3, a4);
7137
+ var dynCall_viiii = Module["dynCall_viiii"] = (a0, a1, a2, a3, a4) => (dynCall_viiii = Module["dynCall_viiii"] = wasmExports["Zb"])(a0, a1, a2, a3, a4);
7139
7138
 
7140
- var dynCall_v = Module["dynCall_v"] = a0 => (dynCall_v = Module["dynCall_v"] = wasmExports["Zb"])(a0);
7139
+ var dynCall_v = Module["dynCall_v"] = a0 => (dynCall_v = Module["dynCall_v"] = wasmExports["_b"])(a0);
7141
7140
 
7142
- var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = wasmExports["_b"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7141
+ var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = wasmExports["$b"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7143
7142
 
7144
- var dynCall_viiiiii = Module["dynCall_viiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_viiiiii = Module["dynCall_viiiiii"] = wasmExports["$b"])(a0, a1, a2, a3, a4, a5, a6);
7143
+ var dynCall_viiiiii = Module["dynCall_viiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_viiiiii = Module["dynCall_viiiiii"] = wasmExports["ac"])(a0, a1, a2, a3, a4, a5, a6);
7145
7144
 
7146
- var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7) => (dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = wasmExports["ac"])(a0, a1, a2, a3, a4, a5, a6, a7);
7145
+ var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7) => (dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = wasmExports["bc"])(a0, a1, a2, a3, a4, a5, a6, a7);
7147
7146
 
7148
- var dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = wasmExports["bc"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7147
+ var dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = wasmExports["cc"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7149
7148
 
7150
- var dynCall_jii = Module["dynCall_jii"] = (a0, a1, a2) => (dynCall_jii = Module["dynCall_jii"] = wasmExports["cc"])(a0, a1, a2);
7149
+ var dynCall_jii = Module["dynCall_jii"] = (a0, a1, a2) => (dynCall_jii = Module["dynCall_jii"] = wasmExports["dc"])(a0, a1, a2);
7151
7150
 
7152
- var dynCall_viidii = Module["dynCall_viidii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viidii = Module["dynCall_viidii"] = wasmExports["dc"])(a0, a1, a2, a3, a4, a5);
7151
+ var dynCall_viidii = Module["dynCall_viidii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viidii = Module["dynCall_viidii"] = wasmExports["ec"])(a0, a1, a2, a3, a4, a5);
7153
7152
 
7154
- var _asyncify_start_unwind = a0 => (_asyncify_start_unwind = wasmExports["ec"])(a0);
7153
+ var _asyncify_start_unwind = a0 => (_asyncify_start_unwind = wasmExports["fc"])(a0);
7155
7154
 
7156
- var _asyncify_stop_unwind = () => (_asyncify_stop_unwind = wasmExports["fc"])();
7155
+ var _asyncify_stop_unwind = () => (_asyncify_stop_unwind = wasmExports["gc"])();
7157
7156
 
7158
- var _asyncify_start_rewind = a0 => (_asyncify_start_rewind = wasmExports["gc"])(a0);
7157
+ var _asyncify_start_rewind = a0 => (_asyncify_start_rewind = wasmExports["hc"])(a0);
7159
7158
 
7160
- var _asyncify_stop_rewind = () => (_asyncify_stop_rewind = wasmExports["hc"])();
7159
+ var _asyncify_stop_rewind = () => (_asyncify_stop_rewind = wasmExports["ic"])();
7161
7160
 
7162
7161
  function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
7163
7162
  var sp = stackSave();
@@ -7491,7 +7490,7 @@ PHPLoader['removeRunDependency'] = function (...args) {
7491
7490
  * Therefore, we export them here.
7492
7491
  */
7493
7492
  PHPLoader['malloc'] = _malloc;
7494
- PHPLoader['free'] = _free;
7493
+ PHPLoader['free'] = typeof _free === 'function' ? _free : PHPLoader['_wasm_free'];
7495
7494
 
7496
7495
  return PHPLoader;
7497
7496