@php-wasm/node 1.2.2 → 2.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 (44) hide show
  1. package/asyncify/7_2_34/php_7_2.wasm +0 -0
  2. package/asyncify/7_3_33/php_7_3.wasm +0 -0
  3. package/asyncify/7_4_33/php_7_4.wasm +0 -0
  4. package/asyncify/8_0_30/php_8_0.wasm +0 -0
  5. package/asyncify/{8_1_23 → 8_1_33}/php_8_1.wasm +0 -0
  6. package/asyncify/{8_2_10 → 8_2_29}/php_8_2.wasm +0 -0
  7. package/asyncify/{8_3_0 → 8_3_23}/php_8_3.wasm +0 -0
  8. package/asyncify/{8_4_0 → 8_4_10}/php_8_4.wasm +0 -0
  9. package/asyncify/extensions/xdebug/7_2/xdebug.so +0 -0
  10. package/asyncify/extensions/xdebug/7_3/xdebug.so +0 -0
  11. package/asyncify/extensions/xdebug/7_4/xdebug.so +0 -0
  12. package/asyncify/extensions/xdebug/8_0/xdebug.so +0 -0
  13. package/asyncify/extensions/xdebug/8_1/xdebug.so +0 -0
  14. package/asyncify/extensions/xdebug/8_2/xdebug.so +0 -0
  15. package/asyncify/extensions/xdebug/8_3/xdebug.so +0 -0
  16. package/asyncify/extensions/xdebug/8_4/xdebug.so +0 -0
  17. package/asyncify/php_7_2.js +61 -51
  18. package/asyncify/php_7_3.js +75 -51
  19. package/asyncify/php_7_4.js +88 -51
  20. package/asyncify/php_8_0.js +79 -56
  21. package/asyncify/php_8_1.js +92 -55
  22. package/asyncify/php_8_2.js +92 -55
  23. package/asyncify/php_8_3.js +92 -55
  24. package/asyncify/php_8_4.js +90 -53
  25. package/index.cjs +906 -562
  26. package/index.js +907 -561
  27. package/jspi/7_2_34/php_7_2.wasm +0 -0
  28. package/jspi/7_3_33/php_7_3.wasm +0 -0
  29. package/jspi/7_4_33/php_7_4.wasm +0 -0
  30. package/jspi/8_0_30/php_8_0.wasm +0 -0
  31. package/jspi/{8_1_23 → 8_1_33}/php_8_1.wasm +0 -0
  32. package/jspi/{8_2_10 → 8_2_29}/php_8_2.wasm +0 -0
  33. package/jspi/{8_3_0 → 8_3_23}/php_8_3.wasm +0 -0
  34. package/jspi/{8_4_0 → 8_4_10}/php_8_4.wasm +0 -0
  35. package/jspi/php_7_2.js +29 -15
  36. package/jspi/php_7_3.js +29 -15
  37. package/jspi/php_7_4.js +29 -15
  38. package/jspi/php_8_0.js +29 -15
  39. package/jspi/php_8_1.js +30 -16
  40. package/jspi/php_8_2.js +30 -16
  41. package/jspi/php_8_3.js +30 -16
  42. package/jspi/php_8_4.js +30 -16
  43. package/lib/node-fs-mount.d.ts +1 -1
  44. package/package.json +7 -7
Binary file
Binary file
Binary file
Binary file
@@ -8,7 +8,8 @@ import path from 'path';
8
8
 
9
9
  const dependencyFilename = path.join(__dirname, '7_2_34', 'php_7_2.wasm');
10
10
  export { dependencyFilename };
11
- export const dependenciesTotalSize = 29015588;
11
+ export const dependenciesTotalSize = 29379158;
12
+ const phpVersionString = '7.2.34';
12
13
  export function init(RuntimeName, PHPLoader) {
13
14
  // The rest of the code comes from the built php.js file and esm-suffix.js
14
15
  // include: shell.js
@@ -830,7 +831,7 @@ export function init(RuntimeName, PHPLoader) {
830
831
  },
831
832
  };
832
833
 
833
- var ___heap_base = 11378752;
834
+ var ___heap_base = 12423744;
834
835
 
835
836
  var alignMemory = (size, alignment) => {
836
837
  return Math.ceil(size / alignment) * alignment;
@@ -994,7 +995,7 @@ export function init(RuntimeName, PHPLoader) {
994
995
 
995
996
  /** @type {WebAssembly.Table} */
996
997
  var wasmTable = new WebAssembly.Table({
997
- initial: 15750,
998
+ initial: 15851,
998
999
  element: 'anyfunc',
999
1000
  });
1000
1001
  var getWasmTableEntry = (funcPtr) => {
@@ -1853,13 +1854,13 @@ export function init(RuntimeName, PHPLoader) {
1853
1854
  1024
1854
1855
  );
1855
1856
 
1856
- var ___stack_high = 11378752;
1857
+ var ___stack_high = 12423744;
1857
1858
 
1858
- var ___stack_low = 11313216;
1859
+ var ___stack_low = 11375168;
1859
1860
 
1860
1861
  var ___stack_pointer = new WebAssembly.Global(
1861
1862
  { value: 'i32', mutable: true },
1862
- 11378752
1863
+ 12423744
1863
1864
  );
1864
1865
 
1865
1866
  var PATH = {
@@ -3913,10 +3914,6 @@ export function init(RuntimeName, PHPLoader) {
3913
3914
  if (FS.isMountpoint(node)) {
3914
3915
  throw new FS.ErrnoError(10);
3915
3916
  }
3916
-
3917
- if (!FS.isDir(node.mode)) {
3918
- throw new FS.ErrnoError(54);
3919
- }
3920
3917
  }
3921
3918
 
3922
3919
  var mount = {
@@ -17742,10 +17739,6 @@ export function init(RuntimeName, PHPLoader) {
17742
17739
  HEAPU32[iov >> 2] = buffer; // iov_base
17743
17740
  HEAPU32[(iov + 4) >> 2] = CHUNK_SIZE; // iov_len
17744
17741
 
17745
- if (typeof js_fd_read === 'undefined') {
17746
- globalThis.js_fd_read = __asyncjs__js_fd_read;
17747
- }
17748
-
17749
17742
  function pump() {
17750
17743
  try {
17751
17744
  while (true) {
@@ -19599,7 +19592,7 @@ export function init(RuntimeName, PHPLoader) {
19599
19592
 
19600
19593
  var addOnExit = (cb) => onExits.unshift(cb);
19601
19594
 
19602
- var STACK_SIZE = 65536;
19595
+ var STACK_SIZE = 1048576;
19603
19596
 
19604
19597
  var STACK_ALIGN = 16;
19605
19598
 
@@ -31815,13 +31808,13 @@ export function init(RuntimeName, PHPLoader) {
31815
31808
  // End JS library code
31816
31809
 
31817
31810
  var ASM_CONSTS = {
31818
- 10384966: ($0) => {
31811
+ 10409421: ($0) => {
31819
31812
  if (!$0) {
31820
31813
  AL.alcErr = 0xa004;
31821
31814
  return 1;
31822
31815
  }
31823
31816
  },
31824
- 10385014: ($0) => {
31817
+ 10409469: ($0) => {
31825
31818
  if (!AL.currentCtx) {
31826
31819
  err('alGetProcAddress() called without a valid context');
31827
31820
  return 1;
@@ -31943,6 +31936,9 @@ export function init(RuntimeName, PHPLoader) {
31943
31936
  while (true) {
31944
31937
  var mask = POLLNVAL;
31945
31938
  mask = SYSCALLS.DEFAULT_POLLMASK;
31939
+ if (FS.isClosed(stream)) {
31940
+ return ERRNO_CODES.EBADF;
31941
+ }
31946
31942
  if (stream.stream_ops?.poll) {
31947
31943
  mask = stream.stream_ops.poll(stream, -1);
31948
31944
  }
@@ -34816,6 +34812,11 @@ export function init(RuntimeName, PHPLoader) {
34816
34812
  a0,
34817
34813
  a1
34818
34814
  ));
34815
+ var _initgroups = (Module['_initgroups'] = (a0, a1) =>
34816
+ (_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
34817
+ a0,
34818
+ a1
34819
+ ));
34819
34820
  var _memcpy = (a0, a1, a2) => (_memcpy = wasmExports['memcpy'])(a0, a1, a2);
34820
34821
  var ___funcs_on_exit = () =>
34821
34822
  (___funcs_on_exit = wasmExports['__funcs_on_exit'])();
@@ -35031,19 +35032,10 @@ export function init(RuntimeName, PHPLoader) {
35031
35032
  }
35032
35033
  }
35033
35034
 
35034
- function invoke_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) {
35035
+ function invoke_vji(index, a1, a2) {
35035
35036
  var sp = stackSave();
35036
35037
  try {
35037
- return Module['dynCall_iiiiiiii'](
35038
- index,
35039
- a1,
35040
- a2,
35041
- a3,
35042
- a4,
35043
- a5,
35044
- a6,
35045
- a7
35046
- );
35038
+ Module['dynCall_vji'](index, a1, a2);
35047
35039
  } catch (e) {
35048
35040
  stackRestore(sp);
35049
35041
  if (e !== e + 0) throw e;
@@ -35051,21 +35043,22 @@ export function init(RuntimeName, PHPLoader) {
35051
35043
  }
35052
35044
  }
35053
35045
 
35054
- function invoke_iiji(index, a1, a2, a3) {
35046
+ function invoke_jii(index, a1, a2) {
35055
35047
  var sp = stackSave();
35056
35048
  try {
35057
- return Module['dynCall_iiji'](index, a1, a2, a3);
35049
+ return Module['dynCall_jii'](index, a1, a2);
35058
35050
  } catch (e) {
35059
35051
  stackRestore(sp);
35060
35052
  if (e !== e + 0) throw e;
35061
35053
  _setThrew(1, 0);
35054
+ return 0n;
35062
35055
  }
35063
35056
  }
35064
35057
 
35065
- function invoke_iijii(index, a1, a2, a3, a4) {
35058
+ function invoke_v(index) {
35066
35059
  var sp = stackSave();
35067
35060
  try {
35068
- return Module['dynCall_iijii'](index, a1, a2, a3, a4);
35061
+ Module['dynCall_v'](index);
35069
35062
  } catch (e) {
35070
35063
  stackRestore(sp);
35071
35064
  if (e !== e + 0) throw e;
@@ -35073,10 +35066,19 @@ export function init(RuntimeName, PHPLoader) {
35073
35066
  }
35074
35067
  }
35075
35068
 
35076
- function invoke_iijiji(index, a1, a2, a3, a4, a5) {
35069
+ function invoke_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) {
35077
35070
  var sp = stackSave();
35078
35071
  try {
35079
- return Module['dynCall_iijiji'](index, a1, a2, a3, a4, a5);
35072
+ return Module['dynCall_iiiiiiii'](
35073
+ index,
35074
+ a1,
35075
+ a2,
35076
+ a3,
35077
+ a4,
35078
+ a5,
35079
+ a6,
35080
+ a7
35081
+ );
35080
35082
  } catch (e) {
35081
35083
  stackRestore(sp);
35082
35084
  if (e !== e + 0) throw e;
@@ -35084,10 +35086,10 @@ export function init(RuntimeName, PHPLoader) {
35084
35086
  }
35085
35087
  }
35086
35088
 
35087
- function invoke_v(index) {
35089
+ function invoke_iiji(index, a1, a2, a3) {
35088
35090
  var sp = stackSave();
35089
35091
  try {
35090
- Module['dynCall_v'](index);
35092
+ return Module['dynCall_iiji'](index, a1, a2, a3);
35091
35093
  } catch (e) {
35092
35094
  stackRestore(sp);
35093
35095
  if (e !== e + 0) throw e;
@@ -35095,10 +35097,10 @@ export function init(RuntimeName, PHPLoader) {
35095
35097
  }
35096
35098
  }
35097
35099
 
35098
- function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
35100
+ function invoke_iijii(index, a1, a2, a3, a4) {
35099
35101
  var sp = stackSave();
35100
35102
  try {
35101
- return Module['dynCall_iiiiiii'](index, a1, a2, a3, a4, a5, a6);
35103
+ return Module['dynCall_iijii'](index, a1, a2, a3, a4);
35102
35104
  } catch (e) {
35103
35105
  stackRestore(sp);
35104
35106
  if (e !== e + 0) throw e;
@@ -35106,10 +35108,10 @@ export function init(RuntimeName, PHPLoader) {
35106
35108
  }
35107
35109
  }
35108
35110
 
35109
- function invoke_vji(index, a1, a2) {
35111
+ function invoke_iijiji(index, a1, a2, a3, a4, a5) {
35110
35112
  var sp = stackSave();
35111
35113
  try {
35112
- Module['dynCall_vji'](index, a1, a2);
35114
+ return Module['dynCall_iijiji'](index, a1, a2, a3, a4, a5);
35113
35115
  } catch (e) {
35114
35116
  stackRestore(sp);
35115
35117
  if (e !== e + 0) throw e;
@@ -35117,10 +35119,10 @@ export function init(RuntimeName, PHPLoader) {
35117
35119
  }
35118
35120
  }
35119
35121
 
35120
- function invoke_viiiiii(index, a1, a2, a3, a4, a5, a6) {
35122
+ function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
35121
35123
  var sp = stackSave();
35122
35124
  try {
35123
- Module['dynCall_viiiiii'](index, a1, a2, a3, a4, a5, a6);
35125
+ return Module['dynCall_iiiiiii'](index, a1, a2, a3, a4, a5, a6);
35124
35126
  } catch (e) {
35125
35127
  stackRestore(sp);
35126
35128
  if (e !== e + 0) throw e;
@@ -35128,10 +35130,10 @@ export function init(RuntimeName, PHPLoader) {
35128
35130
  }
35129
35131
  }
35130
35132
 
35131
- function invoke_viijii(index, a1, a2, a3, a4, a5) {
35133
+ function invoke_viiiiii(index, a1, a2, a3, a4, a5, a6) {
35132
35134
  var sp = stackSave();
35133
35135
  try {
35134
- Module['dynCall_viijii'](index, a1, a2, a3, a4, a5);
35136
+ Module['dynCall_viiiiii'](index, a1, a2, a3, a4, a5, a6);
35135
35137
  } catch (e) {
35136
35138
  stackRestore(sp);
35137
35139
  if (e !== e + 0) throw e;
@@ -35139,10 +35141,10 @@ export function init(RuntimeName, PHPLoader) {
35139
35141
  }
35140
35142
  }
35141
35143
 
35142
- function invoke_viidii(index, a1, a2, a3, a4, a5) {
35144
+ function invoke_viijii(index, a1, a2, a3, a4, a5) {
35143
35145
  var sp = stackSave();
35144
35146
  try {
35145
- Module['dynCall_viidii'](index, a1, a2, a3, a4, a5);
35147
+ Module['dynCall_viijii'](index, a1, a2, a3, a4, a5);
35146
35148
  } catch (e) {
35147
35149
  stackRestore(sp);
35148
35150
  if (e !== e + 0) throw e;
@@ -35150,22 +35152,21 @@ export function init(RuntimeName, PHPLoader) {
35150
35152
  }
35151
35153
  }
35152
35154
 
35153
- function invoke_jiii(index, a1, a2, a3) {
35155
+ function invoke_viidii(index, a1, a2, a3, a4, a5) {
35154
35156
  var sp = stackSave();
35155
35157
  try {
35156
- return Module['dynCall_jiii'](index, a1, a2, a3);
35158
+ Module['dynCall_viidii'](index, a1, a2, a3, a4, a5);
35157
35159
  } catch (e) {
35158
35160
  stackRestore(sp);
35159
35161
  if (e !== e + 0) throw e;
35160
35162
  _setThrew(1, 0);
35161
- return 0n;
35162
35163
  }
35163
35164
  }
35164
35165
 
35165
- function invoke_jii(index, a1, a2) {
35166
+ function invoke_jiii(index, a1, a2, a3) {
35166
35167
  var sp = stackSave();
35167
35168
  try {
35168
- return Module['dynCall_jii'](index, a1, a2);
35169
+ return Module['dynCall_jiii'](index, a1, a2, a3);
35169
35170
  } catch (e) {
35170
35171
  stackRestore(sp);
35171
35172
  if (e !== e + 0) throw e;
@@ -35359,6 +35360,15 @@ export function init(RuntimeName, PHPLoader) {
35359
35360
  };
35360
35361
  }
35361
35362
 
35363
+ /**
35364
+ * Expose the PHP version so the PHP class can make version-specific
35365
+ * adjustments to `php.ini`.
35366
+ */
35367
+ PHPLoader['phpVersion'] = (() => {
35368
+ const [major, minor, patch] = phpVersionString.split('.').map(Number);
35369
+ return { major, minor, patch };
35370
+ })();
35371
+
35362
35372
  return PHPLoader;
35363
35373
 
35364
35374
  // Close the opening bracket from esm-prefix.js:
@@ -8,7 +8,8 @@ import path from 'path';
8
8
 
9
9
  const dependencyFilename = path.join(__dirname, '7_3_33', 'php_7_3.wasm');
10
10
  export { dependencyFilename };
11
- export const dependenciesTotalSize = 29282202;
11
+ export const dependenciesTotalSize = 29695998;
12
+ const phpVersionString = '7.3.33';
12
13
  export function init(RuntimeName, PHPLoader) {
13
14
  // The rest of the code comes from the built php.js file and esm-suffix.js
14
15
  // include: shell.js
@@ -830,7 +831,7 @@ export function init(RuntimeName, PHPLoader) {
830
831
  },
831
832
  };
832
833
 
833
- var ___heap_base = 11704000;
834
+ var ___heap_base = 12759296;
834
835
 
835
836
  var alignMemory = (size, alignment) => {
836
837
  return Math.ceil(size / alignment) * alignment;
@@ -994,7 +995,7 @@ export function init(RuntimeName, PHPLoader) {
994
995
 
995
996
  /** @type {WebAssembly.Table} */
996
997
  var wasmTable = new WebAssembly.Table({
997
- initial: 15715,
998
+ initial: 15819,
998
999
  element: 'anyfunc',
999
1000
  });
1000
1001
  var getWasmTableEntry = (funcPtr) => {
@@ -1853,13 +1854,13 @@ export function init(RuntimeName, PHPLoader) {
1853
1854
  1024
1854
1855
  );
1855
1856
 
1856
- var ___stack_high = 11704000;
1857
+ var ___stack_high = 12759296;
1857
1858
 
1858
- var ___stack_low = 11638464;
1859
+ var ___stack_low = 11710720;
1859
1860
 
1860
1861
  var ___stack_pointer = new WebAssembly.Global(
1861
1862
  { value: 'i32', mutable: true },
1862
- 11704000
1863
+ 12759296
1863
1864
  );
1864
1865
 
1865
1866
  var PATH = {
@@ -3913,10 +3914,6 @@ export function init(RuntimeName, PHPLoader) {
3913
3914
  if (FS.isMountpoint(node)) {
3914
3915
  throw new FS.ErrnoError(10);
3915
3916
  }
3916
-
3917
- if (!FS.isDir(node.mode)) {
3918
- throw new FS.ErrnoError(54);
3919
- }
3920
3917
  }
3921
3918
 
3922
3919
  var mount = {
@@ -17742,10 +17739,6 @@ export function init(RuntimeName, PHPLoader) {
17742
17739
  HEAPU32[iov >> 2] = buffer; // iov_base
17743
17740
  HEAPU32[(iov + 4) >> 2] = CHUNK_SIZE; // iov_len
17744
17741
 
17745
- if (typeof js_fd_read === 'undefined') {
17746
- globalThis.js_fd_read = __asyncjs__js_fd_read;
17747
- }
17748
-
17749
17742
  function pump() {
17750
17743
  try {
17751
17744
  while (true) {
@@ -19599,7 +19592,7 @@ export function init(RuntimeName, PHPLoader) {
19599
19592
 
19600
19593
  var addOnExit = (cb) => onExits.unshift(cb);
19601
19594
 
19602
- var STACK_SIZE = 65536;
19595
+ var STACK_SIZE = 1048576;
19603
19596
 
19604
19597
  var STACK_ALIGN = 16;
19605
19598
 
@@ -31815,13 +31808,13 @@ export function init(RuntimeName, PHPLoader) {
31815
31808
  // End JS library code
31816
31809
 
31817
31810
  var ASM_CONSTS = {
31818
- 10780086: ($0) => {
31811
+ 10814813: ($0) => {
31819
31812
  if (!$0) {
31820
31813
  AL.alcErr = 0xa004;
31821
31814
  return 1;
31822
31815
  }
31823
31816
  },
31824
- 10780134: ($0) => {
31817
+ 10814861: ($0) => {
31825
31818
  if (!AL.currentCtx) {
31826
31819
  err('alGetProcAddress() called without a valid context');
31827
31820
  return 1;
@@ -31943,6 +31936,9 @@ export function init(RuntimeName, PHPLoader) {
31943
31936
  while (true) {
31944
31937
  var mask = POLLNVAL;
31945
31938
  mask = SYSCALLS.DEFAULT_POLLMASK;
31939
+ if (FS.isClosed(stream)) {
31940
+ return ERRNO_CODES.EBADF;
31941
+ }
31946
31942
  if (stream.stream_ops?.poll) {
31947
31943
  mask = stream.stream_ops.poll(stream, -1);
31948
31944
  }
@@ -34579,6 +34575,8 @@ export function init(RuntimeName, PHPLoader) {
34579
34575
  /** @export */
34580
34576
  invoke_iijiji,
34581
34577
  /** @export */
34578
+ invoke_ji,
34579
+ /** @export */
34582
34580
  invoke_jii,
34583
34581
  /** @export */
34584
34582
  invoke_jiii,
@@ -34816,6 +34814,11 @@ export function init(RuntimeName, PHPLoader) {
34816
34814
  a0,
34817
34815
  a1
34818
34816
  ));
34817
+ var _initgroups = (Module['_initgroups'] = (a0, a1) =>
34818
+ (_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
34819
+ a0,
34820
+ a1
34821
+ ));
34819
34822
  var _memcpy = (a0, a1, a2) => (_memcpy = wasmExports['memcpy'])(a0, a1, a2);
34820
34823
  var ___funcs_on_exit = () =>
34821
34824
  (___funcs_on_exit = wasmExports['__funcs_on_exit'])();
@@ -35031,19 +35034,10 @@ export function init(RuntimeName, PHPLoader) {
35031
35034
  }
35032
35035
  }
35033
35036
 
35034
- function invoke_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) {
35037
+ function invoke_vji(index, a1, a2) {
35035
35038
  var sp = stackSave();
35036
35039
  try {
35037
- return Module['dynCall_iiiiiiii'](
35038
- index,
35039
- a1,
35040
- a2,
35041
- a3,
35042
- a4,
35043
- a5,
35044
- a6,
35045
- a7
35046
- );
35040
+ Module['dynCall_vji'](index, a1, a2);
35047
35041
  } catch (e) {
35048
35042
  stackRestore(sp);
35049
35043
  if (e !== e + 0) throw e;
@@ -35051,32 +35045,34 @@ export function init(RuntimeName, PHPLoader) {
35051
35045
  }
35052
35046
  }
35053
35047
 
35054
- function invoke_iiji(index, a1, a2, a3) {
35048
+ function invoke_jii(index, a1, a2) {
35055
35049
  var sp = stackSave();
35056
35050
  try {
35057
- return Module['dynCall_iiji'](index, a1, a2, a3);
35051
+ return Module['dynCall_jii'](index, a1, a2);
35058
35052
  } catch (e) {
35059
35053
  stackRestore(sp);
35060
35054
  if (e !== e + 0) throw e;
35061
35055
  _setThrew(1, 0);
35056
+ return 0n;
35062
35057
  }
35063
35058
  }
35064
35059
 
35065
- function invoke_iijii(index, a1, a2, a3, a4) {
35060
+ function invoke_ji(index, a1) {
35066
35061
  var sp = stackSave();
35067
35062
  try {
35068
- return Module['dynCall_iijii'](index, a1, a2, a3, a4);
35063
+ return Module['dynCall_ji'](index, a1);
35069
35064
  } catch (e) {
35070
35065
  stackRestore(sp);
35071
35066
  if (e !== e + 0) throw e;
35072
35067
  _setThrew(1, 0);
35068
+ return 0n;
35073
35069
  }
35074
35070
  }
35075
35071
 
35076
- function invoke_iijiji(index, a1, a2, a3, a4, a5) {
35072
+ function invoke_v(index) {
35077
35073
  var sp = stackSave();
35078
35074
  try {
35079
- return Module['dynCall_iijiji'](index, a1, a2, a3, a4, a5);
35075
+ Module['dynCall_v'](index);
35080
35076
  } catch (e) {
35081
35077
  stackRestore(sp);
35082
35078
  if (e !== e + 0) throw e;
@@ -35084,10 +35080,19 @@ export function init(RuntimeName, PHPLoader) {
35084
35080
  }
35085
35081
  }
35086
35082
 
35087
- function invoke_v(index) {
35083
+ function invoke_iiiiiiii(index, a1, a2, a3, a4, a5, a6, a7) {
35088
35084
  var sp = stackSave();
35089
35085
  try {
35090
- Module['dynCall_v'](index);
35086
+ return Module['dynCall_iiiiiiii'](
35087
+ index,
35088
+ a1,
35089
+ a2,
35090
+ a3,
35091
+ a4,
35092
+ a5,
35093
+ a6,
35094
+ a7
35095
+ );
35091
35096
  } catch (e) {
35092
35097
  stackRestore(sp);
35093
35098
  if (e !== e + 0) throw e;
@@ -35095,10 +35100,10 @@ export function init(RuntimeName, PHPLoader) {
35095
35100
  }
35096
35101
  }
35097
35102
 
35098
- function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
35103
+ function invoke_iiji(index, a1, a2, a3) {
35099
35104
  var sp = stackSave();
35100
35105
  try {
35101
- return Module['dynCall_iiiiiii'](index, a1, a2, a3, a4, a5, a6);
35106
+ return Module['dynCall_iiji'](index, a1, a2, a3);
35102
35107
  } catch (e) {
35103
35108
  stackRestore(sp);
35104
35109
  if (e !== e + 0) throw e;
@@ -35106,10 +35111,10 @@ export function init(RuntimeName, PHPLoader) {
35106
35111
  }
35107
35112
  }
35108
35113
 
35109
- function invoke_vji(index, a1, a2) {
35114
+ function invoke_iijii(index, a1, a2, a3, a4) {
35110
35115
  var sp = stackSave();
35111
35116
  try {
35112
- Module['dynCall_vji'](index, a1, a2);
35117
+ return Module['dynCall_iijii'](index, a1, a2, a3, a4);
35113
35118
  } catch (e) {
35114
35119
  stackRestore(sp);
35115
35120
  if (e !== e + 0) throw e;
@@ -35117,10 +35122,10 @@ export function init(RuntimeName, PHPLoader) {
35117
35122
  }
35118
35123
  }
35119
35124
 
35120
- function invoke_viiiiii(index, a1, a2, a3, a4, a5, a6) {
35125
+ function invoke_iijiji(index, a1, a2, a3, a4, a5) {
35121
35126
  var sp = stackSave();
35122
35127
  try {
35123
- Module['dynCall_viiiiii'](index, a1, a2, a3, a4, a5, a6);
35128
+ return Module['dynCall_iijiji'](index, a1, a2, a3, a4, a5);
35124
35129
  } catch (e) {
35125
35130
  stackRestore(sp);
35126
35131
  if (e !== e + 0) throw e;
@@ -35128,10 +35133,10 @@ export function init(RuntimeName, PHPLoader) {
35128
35133
  }
35129
35134
  }
35130
35135
 
35131
- function invoke_viijii(index, a1, a2, a3, a4, a5) {
35136
+ function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
35132
35137
  var sp = stackSave();
35133
35138
  try {
35134
- Module['dynCall_viijii'](index, a1, a2, a3, a4, a5);
35139
+ return Module['dynCall_iiiiiii'](index, a1, a2, a3, a4, a5, a6);
35135
35140
  } catch (e) {
35136
35141
  stackRestore(sp);
35137
35142
  if (e !== e + 0) throw e;
@@ -35139,10 +35144,10 @@ export function init(RuntimeName, PHPLoader) {
35139
35144
  }
35140
35145
  }
35141
35146
 
35142
- function invoke_viidii(index, a1, a2, a3, a4, a5) {
35147
+ function invoke_viiiiii(index, a1, a2, a3, a4, a5, a6) {
35143
35148
  var sp = stackSave();
35144
35149
  try {
35145
- Module['dynCall_viidii'](index, a1, a2, a3, a4, a5);
35150
+ Module['dynCall_viiiiii'](index, a1, a2, a3, a4, a5, a6);
35146
35151
  } catch (e) {
35147
35152
  stackRestore(sp);
35148
35153
  if (e !== e + 0) throw e;
@@ -35150,22 +35155,32 @@ export function init(RuntimeName, PHPLoader) {
35150
35155
  }
35151
35156
  }
35152
35157
 
35153
- function invoke_jiii(index, a1, a2, a3) {
35158
+ function invoke_viijii(index, a1, a2, a3, a4, a5) {
35154
35159
  var sp = stackSave();
35155
35160
  try {
35156
- return Module['dynCall_jiii'](index, a1, a2, a3);
35161
+ Module['dynCall_viijii'](index, a1, a2, a3, a4, a5);
35157
35162
  } catch (e) {
35158
35163
  stackRestore(sp);
35159
35164
  if (e !== e + 0) throw e;
35160
35165
  _setThrew(1, 0);
35161
- return 0n;
35162
35166
  }
35163
35167
  }
35164
35168
 
35165
- function invoke_jii(index, a1, a2) {
35169
+ function invoke_viidii(index, a1, a2, a3, a4, a5) {
35166
35170
  var sp = stackSave();
35167
35171
  try {
35168
- return Module['dynCall_jii'](index, a1, a2);
35172
+ Module['dynCall_viidii'](index, a1, a2, a3, a4, a5);
35173
+ } catch (e) {
35174
+ stackRestore(sp);
35175
+ if (e !== e + 0) throw e;
35176
+ _setThrew(1, 0);
35177
+ }
35178
+ }
35179
+
35180
+ function invoke_jiii(index, a1, a2, a3) {
35181
+ var sp = stackSave();
35182
+ try {
35183
+ return Module['dynCall_jiii'](index, a1, a2, a3);
35169
35184
  } catch (e) {
35170
35185
  stackRestore(sp);
35171
35186
  if (e !== e + 0) throw e;
@@ -35359,6 +35374,15 @@ export function init(RuntimeName, PHPLoader) {
35359
35374
  };
35360
35375
  }
35361
35376
 
35377
+ /**
35378
+ * Expose the PHP version so the PHP class can make version-specific
35379
+ * adjustments to `php.ini`.
35380
+ */
35381
+ PHPLoader['phpVersion'] = (() => {
35382
+ const [major, minor, patch] = phpVersionString.split('.').map(Number);
35383
+ return { major, minor, patch };
35384
+ })();
35385
+
35362
35386
  return PHPLoader;
35363
35387
 
35364
35388
  // Close the opening bracket from esm-prefix.js: