@php-wasm/node 0.9.45 → 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 + '/8_2_10/php_8_2.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 14950892;
3
+ export const dependenciesTotalSize = 14701538;
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})`;
@@ -5821,88 +6043,6 @@ function _js_create_input_device(deviceId) {
5821
6043
  return allocateUTF8OnStack(devicePath);
5822
6044
  }
5823
6045
 
5824
- function _js_fd_read(fd, iov, iovcnt, pnum) {
5825
- if (Asyncify.state === Asyncify.State.Normal) {
5826
- var returnCode;
5827
- var stream;
5828
- let num = 0;
5829
- try {
5830
- stream = SYSCALLS.getStreamFromFD(fd);
5831
- const num = doReadv(stream, iov, iovcnt);
5832
- HEAPU32[pnum >> 2] = num;
5833
- return 0;
5834
- } catch (e) {
5835
- if (typeof FS == "undefined" || !(e.name === "ErrnoError")) {
5836
- throw e;
5837
- }
5838
- if (e.errno !== 6 || !(stream?.fd in PHPWASM.child_proc_by_fd)) {
5839
- HEAPU32[pnum >> 2] = 0;
5840
- return returnCode;
5841
- }
5842
- }
5843
- }
5844
- return Asyncify.handleSleep(function(wakeUp) {
5845
- var retries = 0;
5846
- var interval = 50;
5847
- var timeout = 5e3;
5848
- var maxRetries = timeout / interval;
5849
- function poll() {
5850
- var returnCode;
5851
- var stream;
5852
- let num;
5853
- try {
5854
- stream = SYSCALLS.getStreamFromFD(fd);
5855
- num = doReadv(stream, iov, iovcnt);
5856
- returnCode = 0;
5857
- } catch (e) {
5858
- if (typeof FS == "undefined" || !(e.name === "ErrnoError")) {
5859
- console.error(e);
5860
- throw e;
5861
- }
5862
- returnCode = e.errno;
5863
- }
5864
- const success = returnCode === 0;
5865
- const failure = ++retries > maxRetries || !(fd in PHPWASM.child_proc_by_fd) || PHPWASM.child_proc_by_fd[fd]?.exited || FS.isClosed(stream);
5866
- if (success) {
5867
- HEAPU32[pnum >> 2] = num;
5868
- wakeUp(0);
5869
- } else if (failure) {
5870
- HEAPU32[pnum >> 2] = 0;
5871
- wakeUp(returnCode === 6 ? 0 : returnCode);
5872
- } else {
5873
- setTimeout(poll, interval);
5874
- }
5875
- }
5876
- poll();
5877
- });
5878
- }
5879
-
5880
- function _js_module_onMessage(data, bufPtr) {
5881
- if (typeof Asyncify === "undefined") {
5882
- return;
5883
- }
5884
- if (Module["onMessage"]) {
5885
- const dataStr = UTF8ToString(data);
5886
- return Asyncify.handleSleep(wakeUp => {
5887
- Module["onMessage"](dataStr).then(response => {
5888
- const responseBytes = typeof response === "string" ? (new TextEncoder).encode(response) : response;
5889
- const responseSize = responseBytes.byteLength;
5890
- const responsePtr = _malloc(responseSize + 1);
5891
- HEAPU8.set(responseBytes, responsePtr);
5892
- HEAPU8[responsePtr + responseSize] = 0;
5893
- HEAPU8[bufPtr] = responsePtr;
5894
- HEAPU8[bufPtr + 1] = responsePtr >> 8;
5895
- HEAPU8[bufPtr + 2] = responsePtr >> 16;
5896
- HEAPU8[bufPtr + 3] = responsePtr >> 24;
5897
- wakeUp(responseSize);
5898
- }).catch(e => {
5899
- console.error(e);
5900
- wakeUp(-1);
5901
- });
5902
- });
5903
- }
5904
- }
5905
-
5906
6046
  function _js_open_process(command, argsPtr, argsLength, descriptorsPtr, descriptorsLength, cwdPtr, cwdLength, envPtr, envLength) {
5907
6047
  if (!command) {
5908
6048
  return 1;
@@ -6061,48 +6201,6 @@ function _js_open_process(command, argsPtr, argsLength, descriptorsPtr, descript
6061
6201
  });
6062
6202
  }
6063
6203
 
6064
- function _js_popen_to_file(command, mode, exitCodePtr) {
6065
- if (!command) return 1;
6066
- const cmdstr = UTF8ToString(command);
6067
- if (!cmdstr.length) return 0;
6068
- const modestr = UTF8ToString(mode);
6069
- if (!modestr.length) return 0;
6070
- if (modestr === "w") {
6071
- console.error('popen($cmd, "w") is not implemented yet');
6072
- }
6073
- return Asyncify.handleSleep(async wakeUp => {
6074
- let cp;
6075
- try {
6076
- cp = PHPWASM.spawnProcess(cmdstr, []);
6077
- if (cp instanceof Promise) {
6078
- cp = await cp;
6079
- }
6080
- } catch (e) {
6081
- console.error(e);
6082
- if (e.code === "SPAWN_UNSUPPORTED") {
6083
- return 1;
6084
- }
6085
- throw e;
6086
- }
6087
- const outByteArrays = [];
6088
- cp.stdout.on("data", function(data) {
6089
- outByteArrays.push(data);
6090
- });
6091
- const outputPath = "/tmp/popen_output";
6092
- cp.on("exit", function(exitCode) {
6093
- const outBytes = new Uint8Array(outByteArrays.reduce((acc, curr) => acc + curr.length, 0));
6094
- let offset = 0;
6095
- for (const byteArray of outByteArrays) {
6096
- outBytes.set(byteArray, offset);
6097
- offset += byteArray.length;
6098
- }
6099
- FS.writeFile(outputPath, outBytes);
6100
- HEAPU8[exitCodePtr] = exitCode;
6101
- wakeUp(allocateUTF8OnStack(outputPath));
6102
- });
6103
- });
6104
- }
6105
-
6106
6204
  function _js_process_status(pid, exitCodePtr) {
6107
6205
  if (!PHPWASM.child_proc_by_pid[pid]) {
6108
6206
  return -1;
@@ -6598,107 +6696,6 @@ function _wasm_close(socketd) {
6598
6696
  return PHPWASM.shutdownSocket(socketd, 2);
6599
6697
  }
6600
6698
 
6601
- function _wasm_poll_socket(socketd, events, timeout) {
6602
- if (typeof Asyncify === "undefined") {
6603
- return 0;
6604
- }
6605
- const POLLIN = 1;
6606
- /* There is data to read */ const POLLPRI = 2;
6607
- /* There is urgent data to read */ const POLLOUT = 4;
6608
- /* Writing now will not block */ const POLLERR = 8;
6609
- /* Error condition */ const POLLHUP = 16;
6610
- /* Hung up */ const POLLNVAL = 32;
6611
- /* Invalid request: fd not open */ return Asyncify.handleSleep(wakeUp => {
6612
- const polls = [];
6613
- if (socketd in PHPWASM.child_proc_by_fd) {
6614
- const procInfo = PHPWASM.child_proc_by_fd[socketd];
6615
- if (procInfo.exited) {
6616
- wakeUp(0);
6617
- return;
6618
- }
6619
- polls.push(PHPWASM.awaitEvent(procInfo.stdout, "data"));
6620
- } else if (FS.isSocket(FS.getStream(socketd).node.mode)) {
6621
- const sock = getSocketFromFD(socketd);
6622
- if (!sock) {
6623
- wakeUp(0);
6624
- return;
6625
- }
6626
- const lookingFor = new Set;
6627
- if (events & POLLIN || events & POLLPRI) {
6628
- if (sock.server) {
6629
- for (const client of sock.pending) {
6630
- if ((client.recv_queue || []).length > 0) {
6631
- wakeUp(1);
6632
- return;
6633
- }
6634
- }
6635
- } else if ((sock.recv_queue || []).length > 0) {
6636
- wakeUp(1);
6637
- return;
6638
- }
6639
- }
6640
- const webSockets = PHPWASM.getAllWebSockets(sock);
6641
- if (!webSockets.length) {
6642
- wakeUp(0);
6643
- return;
6644
- }
6645
- for (const ws of webSockets) {
6646
- if (events & POLLIN || events & POLLPRI) {
6647
- polls.push(PHPWASM.awaitData(ws));
6648
- lookingFor.add("POLLIN");
6649
- }
6650
- if (events & POLLOUT) {
6651
- polls.push(PHPWASM.awaitConnection(ws));
6652
- lookingFor.add("POLLOUT");
6653
- }
6654
- if (events & POLLHUP) {
6655
- polls.push(PHPWASM.awaitClose(ws));
6656
- lookingFor.add("POLLHUP");
6657
- }
6658
- if (events & POLLERR || events & POLLNVAL) {
6659
- polls.push(PHPWASM.awaitError(ws));
6660
- lookingFor.add("POLLERR");
6661
- }
6662
- }
6663
- } else {
6664
- setTimeout(function() {
6665
- wakeUp(1);
6666
- }, timeout);
6667
- return;
6668
- }
6669
- if (polls.length === 0) {
6670
- console.warn("Unsupported poll event " + events + ", defaulting to setTimeout().");
6671
- setTimeout(function() {
6672
- wakeUp(0);
6673
- }, timeout);
6674
- return;
6675
- }
6676
- const promises = polls.map(([promise]) => promise);
6677
- const clearPolling = () => polls.forEach(([, clear]) => clear());
6678
- let awaken = false;
6679
- let timeoutId;
6680
- Promise.race(promises).then(function(results) {
6681
- if (!awaken) {
6682
- awaken = true;
6683
- wakeUp(1);
6684
- if (timeoutId) {
6685
- clearTimeout(timeoutId);
6686
- }
6687
- clearPolling();
6688
- }
6689
- });
6690
- if (timeout !== -1) {
6691
- timeoutId = setTimeout(function() {
6692
- if (!awaken) {
6693
- awaken = true;
6694
- wakeUp(0);
6695
- clearPolling();
6696
- }
6697
- }, timeout);
6698
- }
6699
- });
6700
- }
6701
-
6702
6699
  function _wasm_setsockopt(socketd, level, optionName, optionValuePtr, optionLen) {
6703
6700
  const optionValue = HEAPU8[optionValuePtr];
6704
6701
  const SOL_SOCKET = 1;
@@ -6734,7 +6731,7 @@ var runAndAbortIfError = func => {
6734
6731
 
6735
6732
  var Asyncify = {
6736
6733
  instrumentWasmImports(imports) {
6737
- 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__.*)$/;
6734
+ 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__.*)$/;
6738
6735
  for (let [x, original] of Object.entries(imports)) {
6739
6736
  if (typeof original == "function") {
6740
6737
  let isAsyncifyImport = original.isAsync || importPattern.test(x);
@@ -6996,7 +6993,8 @@ var wasmImports = {
6996
6993
  /** @export */ gb: _SharpYuvConvert,
6997
6994
  /** @export */ fb: _SharpYuvGetConversionMatrix,
6998
6995
  /** @export */ eb: _SharpYuvInit,
6999
- /** @export */ l: ___assert_fail,
6996
+ /** @export */ n: ___assert_fail,
6997
+ /** @export */ _: __asyncjs__js_module_onMessage,
7000
6998
  /** @export */ db: ___call_sighandler,
7001
6999
  /** @export */ cb: ___syscall_accept4,
7002
7000
  /** @export */ bb: ___syscall_bind,
@@ -7010,7 +7008,7 @@ var wasmImports = {
7010
7008
  /** @export */ Xa: ___syscall_fchmod,
7011
7009
  /** @export */ Wa: ___syscall_fchown32,
7012
7010
  /** @export */ P: ___syscall_fchownat,
7013
- /** @export */ n: ___syscall_fcntl64,
7011
+ /** @export */ m: ___syscall_fcntl64,
7014
7012
  /** @export */ Va: ___syscall_fdatasync,
7015
7013
  /** @export */ Ua: ___syscall_fstat64,
7016
7014
  /** @export */ ma: ___syscall_ftruncate64,
@@ -7077,7 +7075,7 @@ var wasmImports = {
7077
7075
  /** @export */ f: invoke_iiii,
7078
7076
  /** @export */ h: invoke_iiiii,
7079
7077
  /** @export */ p: invoke_iiiiii,
7080
- /** @export */ s: invoke_iiiiiii,
7078
+ /** @export */ t: invoke_iiiiiii,
7081
7079
  /** @export */ w: invoke_iiiiiiii,
7082
7080
  /** @export */ H: invoke_iiiiiiiiii,
7083
7081
  /** @export */ na: invoke_jii,
@@ -7087,15 +7085,14 @@ var wasmImports = {
7087
7085
  /** @export */ A: invoke_viidii,
7088
7086
  /** @export */ g: invoke_viii,
7089
7087
  /** @export */ j: invoke_viiii,
7090
- /** @export */ m: invoke_viiiii,
7088
+ /** @export */ l: invoke_viiiii,
7091
7089
  /** @export */ k: invoke_viiiiii,
7092
7090
  /** @export */ aa: invoke_viiiiiii,
7093
7091
  /** @export */ z: invoke_viiiiiiiii,
7094
7092
  /** @export */ G: _js_create_input_device,
7095
- /** @export */ $: _js_fd_read,
7096
- /** @export */ _: _js_module_onMessage,
7093
+ /** @export */ $: js_fd_read,
7097
7094
  /** @export */ F: _js_open_process,
7098
- /** @export */ Z: _js_popen_to_file,
7095
+ /** @export */ Z: js_popen_to_file,
7099
7096
  /** @export */ Y: _js_process_status,
7100
7097
  /** @export */ X: _js_waitpid,
7101
7098
  /** @export */ W: _makecontext,
@@ -7104,8 +7101,8 @@ var wasmImports = {
7104
7101
  /** @export */ U: _strftime_l,
7105
7102
  /** @export */ T: _strptime,
7106
7103
  /** @export */ S: _swapcontext,
7107
- /** @export */ t: _wasm_close,
7108
- /** @export */ u: _wasm_poll_socket,
7104
+ /** @export */ s: _wasm_close,
7105
+ /** @export */ u: wasm_poll_socket,
7109
7106
  /** @export */ o: _wasm_setsockopt,
7110
7107
  /** @export */ R: _wasm_shutdown
7111
7108
  };
@@ -7178,69 +7175,71 @@ var _wasm_sapi_handle_request = Module["_wasm_sapi_handle_request"] = () => (_wa
7178
7175
 
7179
7176
  var _php_wasm_init = Module["_php_wasm_init"] = () => (_php_wasm_init = Module["_php_wasm_init"] = wasmExports["Pb"])();
7180
7177
 
7181
- var ___funcs_on_exit = () => (___funcs_on_exit = wasmExports["Qb"])();
7178
+ var _wasm_free = Module["_wasm_free"] = a0 => (_wasm_free = Module["_wasm_free"] = wasmExports["Qb"])(a0);
7179
+
7180
+ var ___funcs_on_exit = () => (___funcs_on_exit = wasmExports["Rb"])();
7182
7181
 
7183
- var _emscripten_builtin_memalign = (a0, a1) => (_emscripten_builtin_memalign = wasmExports["Rb"])(a0, a1);
7182
+ var _emscripten_builtin_memalign = (a0, a1) => (_emscripten_builtin_memalign = wasmExports["Sb"])(a0, a1);
7184
7183
 
7185
- var __emscripten_timeout = (a0, a1) => (__emscripten_timeout = wasmExports["Sb"])(a0, a1);
7184
+ var __emscripten_timeout = (a0, a1) => (__emscripten_timeout = wasmExports["Tb"])(a0, a1);
7186
7185
 
7187
- var _setThrew = (a0, a1) => (_setThrew = wasmExports["Tb"])(a0, a1);
7186
+ var _setThrew = (a0, a1) => (_setThrew = wasmExports["Ub"])(a0, a1);
7188
7187
 
7189
- var __emscripten_tempret_set = a0 => (__emscripten_tempret_set = wasmExports["Ub"])(a0);
7188
+ var __emscripten_tempret_set = a0 => (__emscripten_tempret_set = wasmExports["Vb"])(a0);
7190
7189
 
7191
- var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["Vb"])(a0);
7190
+ var __emscripten_stack_restore = a0 => (__emscripten_stack_restore = wasmExports["Wb"])(a0);
7192
7191
 
7193
- var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["Wb"])(a0);
7192
+ var __emscripten_stack_alloc = a0 => (__emscripten_stack_alloc = wasmExports["Xb"])(a0);
7194
7193
 
7195
- var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["Xb"])();
7194
+ var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports["Yb"])();
7196
7195
 
7197
- var dynCall_iiii = Module["dynCall_iiii"] = (a0, a1, a2, a3) => (dynCall_iiii = Module["dynCall_iiii"] = wasmExports["Yb"])(a0, a1, a2, a3);
7196
+ var dynCall_iiii = Module["dynCall_iiii"] = (a0, a1, a2, a3) => (dynCall_iiii = Module["dynCall_iiii"] = wasmExports["Zb"])(a0, a1, a2, a3);
7198
7197
 
7199
- var dynCall_ii = Module["dynCall_ii"] = (a0, a1) => (dynCall_ii = Module["dynCall_ii"] = wasmExports["Zb"])(a0, a1);
7198
+ var dynCall_ii = Module["dynCall_ii"] = (a0, a1) => (dynCall_ii = Module["dynCall_ii"] = wasmExports["_b"])(a0, a1);
7200
7199
 
7201
- var dynCall_vi = Module["dynCall_vi"] = (a0, a1) => (dynCall_vi = Module["dynCall_vi"] = wasmExports["_b"])(a0, a1);
7200
+ var dynCall_vi = Module["dynCall_vi"] = (a0, a1) => (dynCall_vi = Module["dynCall_vi"] = wasmExports["$b"])(a0, a1);
7202
7201
 
7203
- var dynCall_vii = Module["dynCall_vii"] = (a0, a1, a2) => (dynCall_vii = Module["dynCall_vii"] = wasmExports["$b"])(a0, a1, a2);
7202
+ var dynCall_vii = Module["dynCall_vii"] = (a0, a1, a2) => (dynCall_vii = Module["dynCall_vii"] = wasmExports["ac"])(a0, a1, a2);
7204
7203
 
7205
- var dynCall_viiiii = Module["dynCall_viiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viiiii = Module["dynCall_viiiii"] = wasmExports["ac"])(a0, a1, a2, a3, a4, a5);
7204
+ var dynCall_viiiii = Module["dynCall_viiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viiiii = Module["dynCall_viiiii"] = wasmExports["bc"])(a0, a1, a2, a3, a4, a5);
7206
7205
 
7207
- var dynCall_iii = Module["dynCall_iii"] = (a0, a1, a2) => (dynCall_iii = Module["dynCall_iii"] = wasmExports["bc"])(a0, a1, a2);
7206
+ var dynCall_iii = Module["dynCall_iii"] = (a0, a1, a2) => (dynCall_iii = Module["dynCall_iii"] = wasmExports["cc"])(a0, a1, a2);
7208
7207
 
7209
- var dynCall_iiiii = Module["dynCall_iiiii"] = (a0, a1, a2, a3, a4) => (dynCall_iiiii = Module["dynCall_iiiii"] = wasmExports["cc"])(a0, a1, a2, a3, a4);
7208
+ var dynCall_iiiii = Module["dynCall_iiiii"] = (a0, a1, a2, a3, a4) => (dynCall_iiiii = Module["dynCall_iiiii"] = wasmExports["dc"])(a0, a1, a2, a3, a4);
7210
7209
 
7211
- var dynCall_iiiiii = Module["dynCall_iiiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_iiiiii = Module["dynCall_iiiiii"] = wasmExports["dc"])(a0, a1, a2, a3, a4, a5);
7210
+ var dynCall_iiiiii = Module["dynCall_iiiiii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_iiiiii = Module["dynCall_iiiiii"] = wasmExports["ec"])(a0, a1, a2, a3, a4, a5);
7212
7211
 
7213
- var dynCall_viii = Module["dynCall_viii"] = (a0, a1, a2, a3) => (dynCall_viii = Module["dynCall_viii"] = wasmExports["ec"])(a0, a1, a2, a3);
7212
+ var dynCall_viii = Module["dynCall_viii"] = (a0, a1, a2, a3) => (dynCall_viii = Module["dynCall_viii"] = wasmExports["fc"])(a0, a1, a2, a3);
7214
7213
 
7215
- var dynCall_v = Module["dynCall_v"] = a0 => (dynCall_v = Module["dynCall_v"] = wasmExports["fc"])(a0);
7214
+ var dynCall_v = Module["dynCall_v"] = a0 => (dynCall_v = Module["dynCall_v"] = wasmExports["gc"])(a0);
7216
7215
 
7217
- var dynCall_i = Module["dynCall_i"] = a0 => (dynCall_i = Module["dynCall_i"] = wasmExports["gc"])(a0);
7216
+ var dynCall_i = Module["dynCall_i"] = a0 => (dynCall_i = Module["dynCall_i"] = wasmExports["hc"])(a0);
7218
7217
 
7219
- var dynCall_viiii = Module["dynCall_viiii"] = (a0, a1, a2, a3, a4) => (dynCall_viiii = Module["dynCall_viiii"] = wasmExports["hc"])(a0, a1, a2, a3, a4);
7218
+ var dynCall_viiii = Module["dynCall_viiii"] = (a0, a1, a2, a3, a4) => (dynCall_viiii = Module["dynCall_viiii"] = wasmExports["ic"])(a0, a1, a2, a3, a4);
7220
7219
 
7221
- var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_iiiiiii = Module["dynCall_iiiiiii"] = wasmExports["ic"])(a0, a1, a2, a3, a4, a5, a6);
7220
+ var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_iiiiiii = Module["dynCall_iiiiiii"] = wasmExports["jc"])(a0, a1, a2, a3, a4, a5, a6);
7222
7221
 
7223
- var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = wasmExports["jc"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7222
+ var dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_viiiiiiiii = Module["dynCall_viiiiiiiii"] = wasmExports["kc"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7224
7223
 
7225
- var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7) => (dynCall_viiiiiii = Module["dynCall_viiiiiii"] = wasmExports["kc"])(a0, a1, a2, a3, a4, a5, a6, a7);
7224
+ var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7) => (dynCall_viiiiiii = Module["dynCall_viiiiiii"] = wasmExports["lc"])(a0, a1, a2, a3, a4, a5, a6, a7);
7226
7225
 
7227
- var dynCall_viiiiii = Module["dynCall_viiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_viiiiii = Module["dynCall_viiiiii"] = wasmExports["lc"])(a0, a1, a2, a3, a4, a5, a6);
7226
+ var dynCall_viiiiii = Module["dynCall_viiiiii"] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_viiiiii = Module["dynCall_viiiiii"] = wasmExports["mc"])(a0, a1, a2, a3, a4, a5, a6);
7228
7227
 
7229
- var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7) => (dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = wasmExports["mc"])(a0, a1, a2, a3, a4, a5, a6, a7);
7228
+ var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7) => (dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = wasmExports["nc"])(a0, a1, a2, a3, a4, a5, a6, a7);
7230
7229
 
7231
- var dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = wasmExports["nc"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7230
+ var dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_iiiiiiiiii = Module["dynCall_iiiiiiiiii"] = wasmExports["oc"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
7232
7231
 
7233
- var dynCall_jii = Module["dynCall_jii"] = (a0, a1, a2) => (dynCall_jii = Module["dynCall_jii"] = wasmExports["oc"])(a0, a1, a2);
7232
+ var dynCall_jii = Module["dynCall_jii"] = (a0, a1, a2) => (dynCall_jii = Module["dynCall_jii"] = wasmExports["pc"])(a0, a1, a2);
7234
7233
 
7235
- var dynCall_viidii = Module["dynCall_viidii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viidii = Module["dynCall_viidii"] = wasmExports["pc"])(a0, a1, a2, a3, a4, a5);
7234
+ var dynCall_viidii = Module["dynCall_viidii"] = (a0, a1, a2, a3, a4, a5) => (dynCall_viidii = Module["dynCall_viidii"] = wasmExports["qc"])(a0, a1, a2, a3, a4, a5);
7236
7235
 
7237
- var _asyncify_start_unwind = a0 => (_asyncify_start_unwind = wasmExports["qc"])(a0);
7236
+ var _asyncify_start_unwind = a0 => (_asyncify_start_unwind = wasmExports["rc"])(a0);
7238
7237
 
7239
- var _asyncify_stop_unwind = () => (_asyncify_stop_unwind = wasmExports["rc"])();
7238
+ var _asyncify_stop_unwind = () => (_asyncify_stop_unwind = wasmExports["sc"])();
7240
7239
 
7241
- var _asyncify_start_rewind = a0 => (_asyncify_start_rewind = wasmExports["sc"])(a0);
7240
+ var _asyncify_start_rewind = a0 => (_asyncify_start_rewind = wasmExports["tc"])(a0);
7242
7241
 
7243
- var _asyncify_stop_rewind = () => (_asyncify_stop_rewind = wasmExports["tc"])();
7242
+ var _asyncify_stop_rewind = () => (_asyncify_stop_rewind = wasmExports["uc"])();
7244
7243
 
7245
7244
  function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
7246
7245
  var sp = stackSave();
@@ -7585,7 +7584,7 @@ PHPLoader['removeRunDependency'] = function (...args) {
7585
7584
  * Therefore, we export them here.
7586
7585
  */
7587
7586
  PHPLoader['malloc'] = _malloc;
7588
- PHPLoader['free'] = _free;
7587
+ PHPLoader['free'] = typeof _free === 'function' ? _free : PHPLoader['_wasm_free'];
7589
7588
 
7590
7589
  return PHPLoader;
7591
7590