@php-wasm/web-7-4 3.1.33 → 3.1.35

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.
@@ -4796,6 +4796,7 @@ export function init(RuntimeName, PHPLoader) {
4796
4796
  O_NONBLOCK: 2048,
4797
4797
  POLLHUP: 16,
4798
4798
  SETFL_MASK: 3072,
4799
+ socketTimeouts: new Map,
4799
4800
  init: function () {
4800
4801
  if (PHPLoader.bindUserSpace) {
4801
4802
  addOnInit(() => {
@@ -5159,6 +5160,29 @@ export function init(RuntimeName, PHPLoader) {
5159
5160
  return [promise, cancel];
5160
5161
  },
5161
5162
  noop: function () {},
5163
+ parseSocketTimeout: function (optionValuePtr, optionLen) {
5164
+ if (!optionValuePtr || optionLen < 8) {
5165
+ return null;
5166
+ }
5167
+ let seconds;
5168
+ let microseconds;
5169
+ if (optionLen >= 16) {
5170
+ seconds = Number(HEAP64[optionValuePtr >> 3]);
5171
+ microseconds = Number(HEAP64[(optionValuePtr + 8) >> 3]);
5172
+ } else {
5173
+ seconds = HEAP32[optionValuePtr >> 2];
5174
+ microseconds = HEAP32[(optionValuePtr + 4) >> 2];
5175
+ }
5176
+ if (
5177
+ !Number.isFinite(seconds) ||
5178
+ !Number.isFinite(microseconds) ||
5179
+ seconds < 0 ||
5180
+ microseconds < 0
5181
+ ) {
5182
+ return null;
5183
+ }
5184
+ return seconds * 1e3 + Math.ceil(microseconds / 1e3);
5185
+ },
5162
5186
  spawnProcess: function (command, args, options) {
5163
5187
  if (Module['spawnProcess']) {
5164
5188
  const spawned = Module['spawnProcess'](command, args, {
@@ -5187,6 +5211,7 @@ export function init(RuntimeName, PHPLoader) {
5187
5211
  throw e;
5188
5212
  },
5189
5213
  shutdownSocket: function (socketd, how) {
5214
+ PHPWASM.socketTimeouts.delete(socketd);
5190
5215
  const sock = getSocketFromFD(socketd);
5191
5216
  const peer = Object.values(sock.peers)[0];
5192
5217
  if (!peer) {
@@ -5256,41 +5281,74 @@ export function init(RuntimeName, PHPLoader) {
5256
5281
  wakeUp(-ERRNO_CODES.ECONNREFUSED);
5257
5282
  return;
5258
5283
  }
5259
- const timeout = 3e4;
5284
+ // Wait for the connection to be established. A zero timeval
5285
+ // disables the timeout, matching SO_SNDTIMEO semantics.
5286
+ const sendTimeout = PHPWASM.socketTimeouts.get(sockfd)?.send;
5287
+ const timeout = sendTimeout ?? 3e4;
5260
5288
  let resolved = false;
5261
- const timeoutId = setTimeout(() => {
5262
- if (!resolved) {
5263
- resolved = true;
5264
- wakeUp(-ERRNO_CODES.ETIMEDOUT);
5265
- }
5266
- }, timeout);
5267
- const handleOpen = () => {
5268
- if (!resolved) {
5269
- resolved = true;
5289
+ let timeoutId;
5290
+ let handleOpen;
5291
+ let handleError;
5292
+ let handleClose;
5293
+ const peer = PHPWASM.getAllPeers(sock).find(
5294
+ (candidate) => candidate.socket === ws
5295
+ );
5296
+
5297
+ const cleanupConnectListeners = () => {
5298
+ if (typeof timeoutId !== 'undefined') {
5270
5299
  clearTimeout(timeoutId);
5271
- ws.removeEventListener('error', handleError);
5272
- ws.removeEventListener('close', handleClose);
5273
- wakeUp(0);
5274
5300
  }
5301
+ ws.removeEventListener('open', handleOpen);
5302
+ ws.removeEventListener('error', handleError);
5303
+ ws.removeEventListener('close', handleClose);
5275
5304
  };
5276
- const handleError = () => {
5277
- if (!resolved) {
5278
- resolved = true;
5279
- clearTimeout(timeoutId);
5280
- ws.removeEventListener('open', handleOpen);
5281
- ws.removeEventListener('close', handleClose);
5282
- wakeUp(-ERRNO_CODES.ECONNREFUSED);
5305
+
5306
+ const cleanupFailedConnect = (errno) => {
5307
+ try {
5308
+ if (
5309
+ ws.readyState !== ws.CLOSING &&
5310
+ ws.readyState !== ws.CLOSED
5311
+ ) {
5312
+ ws.close();
5313
+ }
5314
+ } catch (e) {
5315
+ // Ignore close errors on an already-failed connect.
5283
5316
  }
5317
+ if (peer) {
5318
+ SOCKFS.websocket_sock_ops.removePeer(sock, peer);
5319
+ }
5320
+ sock.connecting = false;
5321
+ sock.error = errno;
5284
5322
  };
5285
- const handleClose = () => {
5323
+
5324
+ const finishConnect = (result) => {
5286
5325
  if (!resolved) {
5287
5326
  resolved = true;
5288
- clearTimeout(timeoutId);
5289
- ws.removeEventListener('open', handleOpen);
5290
- ws.removeEventListener('error', handleError);
5291
- wakeUp(-ERRNO_CODES.ECONNREFUSED);
5327
+ cleanupConnectListeners();
5328
+ if (result < 0) {
5329
+ cleanupFailedConnect(-result);
5330
+ }
5331
+ wakeUp(result);
5292
5332
  }
5293
5333
  };
5334
+
5335
+ if (timeout > 0) {
5336
+ timeoutId = setTimeout(() => {
5337
+ finishConnect(-ERRNO_CODES.ETIMEDOUT);
5338
+ }, timeout);
5339
+ }
5340
+
5341
+ handleOpen = () => {
5342
+ finishConnect(0);
5343
+ };
5344
+
5345
+ handleError = () => {
5346
+ finishConnect(-ERRNO_CODES.ECONNREFUSED);
5347
+ };
5348
+
5349
+ handleClose = () => {
5350
+ finishConnect(-ERRNO_CODES.ECONNREFUSED);
5351
+ };
5294
5352
  ws.addEventListener('open', handleOpen);
5295
5353
  ws.addEventListener('error', handleError);
5296
5354
  ws.addEventListener('close', handleClose);
@@ -7650,21 +7708,35 @@ export function init(RuntimeName, PHPLoader) {
7650
7708
  const SO_SNDTIMEO = 67;
7651
7709
  const IPPROTO_TCP = 6;
7652
7710
  const TCP_NODELAY = 1;
7711
+ if (
7712
+ level === SOL_SOCKET &&
7713
+ (optionName === SO_RCVTIMEO || optionName === SO_SNDTIMEO)
7714
+ ) {
7715
+ const timeoutMs = PHPWASM.parseSocketTimeout(
7716
+ optionValuePtr,
7717
+ optionLen
7718
+ );
7719
+ if (timeoutMs === null) {
7720
+ return -1;
7721
+ }
7722
+ const timeouts = PHPWASM.socketTimeouts.get(socketd) || {};
7723
+ if (optionName === SO_RCVTIMEO) {
7724
+ timeouts.receive = timeoutMs;
7725
+ } else {
7726
+ timeouts.send = timeoutMs;
7727
+ }
7728
+ PHPWASM.socketTimeouts.set(socketd, timeouts);
7729
+ return 0;
7730
+ }
7653
7731
  const isForwardable =
7654
7732
  (level === SOL_SOCKET && optionName === SO_KEEPALIVE) ||
7655
7733
  (level === IPPROTO_TCP && optionName === TCP_NODELAY);
7656
- const isIgnorable =
7657
- level === SOL_SOCKET &&
7658
- (optionName === SO_RCVTIMEO || optionName === SO_SNDTIMEO);
7659
- if (!isForwardable && !isIgnorable) {
7734
+ if (!isForwardable) {
7660
7735
  console.warn(
7661
7736
  `Unsupported socket option: ${level}, ${optionName}, ${optionValue}`
7662
7737
  );
7663
7738
  return -1;
7664
7739
  }
7665
- if (isIgnorable) {
7666
- return 0;
7667
- }
7668
7740
  const ws = PHPWASM.getAllWebSockets(socketd)[0];
7669
7741
  if (!ws) {
7670
7742
  return -1;
Binary file
package/jspi/php_7_4.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import dependencyFilename from './7_4_33/php_7_4.wasm';
2
2
  export { dependencyFilename };
3
- export const dependenciesTotalSize = 16451954;
3
+ export const dependenciesTotalSize = 16452751;
4
4
  const phpVersionString = '7.4.33';
5
5
  export function init(RuntimeName, PHPLoader) {
6
6
  // The rest of the code comes from the built php.js file and esm-suffix.js
@@ -174,6 +174,9 @@ export function init(RuntimeName, PHPLoader) {
174
174
  }
175
175
  function getWasmImports() {
176
176
  Asyncify.instrumentWasmImports(wasmImports);
177
+ wasmImports['__c_longjmp'] ??= new WebAssembly.Tag({
178
+ parameters: ['i32'],
179
+ });
177
180
  var imports = {
178
181
  env: wasmImports,
179
182
  wasi_snapshot_preview1: wasmImports,
@@ -4670,6 +4673,7 @@ export function init(RuntimeName, PHPLoader) {
4670
4673
  O_NONBLOCK: 2048,
4671
4674
  POLLHUP: 16,
4672
4675
  SETFL_MASK: 3072,
4676
+ socketTimeouts: new Map,
4673
4677
  init: function () {
4674
4678
  if (PHPLoader.bindUserSpace) {
4675
4679
  addOnInit(() => {
@@ -5033,6 +5037,29 @@ export function init(RuntimeName, PHPLoader) {
5033
5037
  return [promise, cancel];
5034
5038
  },
5035
5039
  noop: function () {},
5040
+ parseSocketTimeout: function (optionValuePtr, optionLen) {
5041
+ if (!optionValuePtr || optionLen < 8) {
5042
+ return null;
5043
+ }
5044
+ let seconds;
5045
+ let microseconds;
5046
+ if (optionLen >= 16) {
5047
+ seconds = Number(HEAP64[optionValuePtr >> 3]);
5048
+ microseconds = Number(HEAP64[(optionValuePtr + 8) >> 3]);
5049
+ } else {
5050
+ seconds = HEAP32[optionValuePtr >> 2];
5051
+ microseconds = HEAP32[(optionValuePtr + 4) >> 2];
5052
+ }
5053
+ if (
5054
+ !Number.isFinite(seconds) ||
5055
+ !Number.isFinite(microseconds) ||
5056
+ seconds < 0 ||
5057
+ microseconds < 0
5058
+ ) {
5059
+ return null;
5060
+ }
5061
+ return seconds * 1e3 + Math.ceil(microseconds / 1e3);
5062
+ },
5036
5063
  spawnProcess: function (command, args, options) {
5037
5064
  if (Module['spawnProcess']) {
5038
5065
  const spawned = Module['spawnProcess'](command, args, {
@@ -5061,6 +5088,7 @@ export function init(RuntimeName, PHPLoader) {
5061
5088
  throw e;
5062
5089
  },
5063
5090
  shutdownSocket: function (socketd, how) {
5091
+ PHPWASM.socketTimeouts.delete(socketd);
5064
5092
  const sock = getSocketFromFD(socketd);
5065
5093
  const peer = Object.values(sock.peers)[0];
5066
5094
  if (!peer) {
@@ -5130,41 +5158,74 @@ export function init(RuntimeName, PHPLoader) {
5130
5158
  wakeUp(-ERRNO_CODES.ECONNREFUSED);
5131
5159
  return;
5132
5160
  }
5133
- const timeout = 3e4;
5161
+ // Wait for the connection to be established. A zero timeval
5162
+ // disables the timeout, matching SO_SNDTIMEO semantics.
5163
+ const sendTimeout = PHPWASM.socketTimeouts.get(sockfd)?.send;
5164
+ const timeout = sendTimeout ?? 3e4;
5134
5165
  let resolved = false;
5135
- const timeoutId = setTimeout(() => {
5136
- if (!resolved) {
5137
- resolved = true;
5138
- wakeUp(-ERRNO_CODES.ETIMEDOUT);
5139
- }
5140
- }, timeout);
5141
- const handleOpen = () => {
5142
- if (!resolved) {
5143
- resolved = true;
5166
+ let timeoutId;
5167
+ let handleOpen;
5168
+ let handleError;
5169
+ let handleClose;
5170
+ const peer = PHPWASM.getAllPeers(sock).find(
5171
+ (candidate) => candidate.socket === ws
5172
+ );
5173
+
5174
+ const cleanupConnectListeners = () => {
5175
+ if (typeof timeoutId !== 'undefined') {
5144
5176
  clearTimeout(timeoutId);
5145
- ws.removeEventListener('error', handleError);
5146
- ws.removeEventListener('close', handleClose);
5147
- wakeUp(0);
5148
5177
  }
5178
+ ws.removeEventListener('open', handleOpen);
5179
+ ws.removeEventListener('error', handleError);
5180
+ ws.removeEventListener('close', handleClose);
5149
5181
  };
5150
- const handleError = () => {
5151
- if (!resolved) {
5152
- resolved = true;
5153
- clearTimeout(timeoutId);
5154
- ws.removeEventListener('open', handleOpen);
5155
- ws.removeEventListener('close', handleClose);
5156
- wakeUp(-ERRNO_CODES.ECONNREFUSED);
5182
+
5183
+ const cleanupFailedConnect = (errno) => {
5184
+ try {
5185
+ if (
5186
+ ws.readyState !== ws.CLOSING &&
5187
+ ws.readyState !== ws.CLOSED
5188
+ ) {
5189
+ ws.close();
5190
+ }
5191
+ } catch (e) {
5192
+ // Ignore close errors on an already-failed connect.
5157
5193
  }
5194
+ if (peer) {
5195
+ SOCKFS.websocket_sock_ops.removePeer(sock, peer);
5196
+ }
5197
+ sock.connecting = false;
5198
+ sock.error = errno;
5158
5199
  };
5159
- const handleClose = () => {
5200
+
5201
+ const finishConnect = (result) => {
5160
5202
  if (!resolved) {
5161
5203
  resolved = true;
5162
- clearTimeout(timeoutId);
5163
- ws.removeEventListener('open', handleOpen);
5164
- ws.removeEventListener('error', handleError);
5165
- wakeUp(-ERRNO_CODES.ECONNREFUSED);
5204
+ cleanupConnectListeners();
5205
+ if (result < 0) {
5206
+ cleanupFailedConnect(-result);
5207
+ }
5208
+ wakeUp(result);
5166
5209
  }
5167
5210
  };
5211
+
5212
+ if (timeout > 0) {
5213
+ timeoutId = setTimeout(() => {
5214
+ finishConnect(-ERRNO_CODES.ETIMEDOUT);
5215
+ }, timeout);
5216
+ }
5217
+
5218
+ handleOpen = () => {
5219
+ finishConnect(0);
5220
+ };
5221
+
5222
+ handleError = () => {
5223
+ finishConnect(-ERRNO_CODES.ECONNREFUSED);
5224
+ };
5225
+
5226
+ handleClose = () => {
5227
+ finishConnect(-ERRNO_CODES.ECONNREFUSED);
5228
+ };
5168
5229
  ws.addEventListener('open', handleOpen);
5169
5230
  ws.addEventListener('error', handleError);
5170
5231
  ws.addEventListener('close', handleClose);
@@ -7520,21 +7581,35 @@ export function init(RuntimeName, PHPLoader) {
7520
7581
  const SO_SNDTIMEO = 67;
7521
7582
  const IPPROTO_TCP = 6;
7522
7583
  const TCP_NODELAY = 1;
7584
+ if (
7585
+ level === SOL_SOCKET &&
7586
+ (optionName === SO_RCVTIMEO || optionName === SO_SNDTIMEO)
7587
+ ) {
7588
+ const timeoutMs = PHPWASM.parseSocketTimeout(
7589
+ optionValuePtr,
7590
+ optionLen
7591
+ );
7592
+ if (timeoutMs === null) {
7593
+ return -1;
7594
+ }
7595
+ const timeouts = PHPWASM.socketTimeouts.get(socketd) || {};
7596
+ if (optionName === SO_RCVTIMEO) {
7597
+ timeouts.receive = timeoutMs;
7598
+ } else {
7599
+ timeouts.send = timeoutMs;
7600
+ }
7601
+ PHPWASM.socketTimeouts.set(socketd, timeouts);
7602
+ return 0;
7603
+ }
7523
7604
  const isForwardable =
7524
7605
  (level === SOL_SOCKET && optionName === SO_KEEPALIVE) ||
7525
7606
  (level === IPPROTO_TCP && optionName === TCP_NODELAY);
7526
- const isIgnorable =
7527
- level === SOL_SOCKET &&
7528
- (optionName === SO_RCVTIMEO || optionName === SO_SNDTIMEO);
7529
- if (!isForwardable && !isIgnorable) {
7607
+ if (!isForwardable) {
7530
7608
  console.warn(
7531
7609
  `Unsupported socket option: ${level}, ${optionName}, ${optionValue}`
7532
7610
  );
7533
7611
  return -1;
7534
7612
  }
7535
- if (isIgnorable) {
7536
- return 0;
7537
- }
7538
7613
  const ws = PHPWASM.getAllWebSockets(socketd)[0];
7539
7614
  if (!ws) {
7540
7615
  return -1;
@@ -8138,6 +8213,7 @@ export function init(RuntimeName, PHPLoader) {
8138
8213
  _getenv,
8139
8214
  _strlen,
8140
8215
  _memcmp,
8216
+ _strtoll,
8141
8217
  _malloc,
8142
8218
  _realloc,
8143
8219
  _strstr,
@@ -8145,6 +8221,9 @@ export function init(RuntimeName, PHPLoader) {
8145
8221
  _memchr,
8146
8222
  _strrchr,
8147
8223
  _snprintf,
8224
+ ___wasm_setjmp,
8225
+ ___wasm_setjmp_test,
8226
+ ___wasm_longjmp,
8148
8227
  _pow,
8149
8228
  _tolower,
8150
8229
  _calloc,
@@ -8158,6 +8237,11 @@ export function init(RuntimeName, PHPLoader) {
8158
8237
  _stat,
8159
8238
  _fopen,
8160
8239
  _open,
8240
+ _rename,
8241
+ _unlink,
8242
+ _mkdir,
8243
+ _rmdir,
8244
+ _opendir,
8161
8245
  _strncat,
8162
8246
  _abort,
8163
8247
  _strchr,
@@ -8165,10 +8249,15 @@ export function init(RuntimeName, PHPLoader) {
8165
8249
  _strtok_r,
8166
8250
  _gettimeofday,
8167
8251
  _strncpy,
8252
+ _isalnum,
8168
8253
  _close,
8254
+ _ftell,
8255
+ _fseek,
8169
8256
  _wasm_read,
8170
8257
  _feof,
8171
8258
  _fflush,
8259
+ _closedir,
8260
+ _readdir,
8172
8261
  _siprintf,
8173
8262
  _strtol,
8174
8263
  _strtod,
@@ -8197,8 +8286,10 @@ export function init(RuntimeName, PHPLoader) {
8197
8286
  _qsort,
8198
8287
  _rewind,
8199
8288
  _fgets,
8289
+ _writev,
8200
8290
  _initgroups,
8201
8291
  _atol,
8292
+ _posix_memalign,
8202
8293
  ___wrap_usleep,
8203
8294
  ___wrap_select,
8204
8295
  _wasm_set_sapi_name,
@@ -8223,6 +8314,19 @@ export function init(RuntimeName, PHPLoader) {
8223
8314
  _php_wasm_init,
8224
8315
  _wasm_free,
8225
8316
  _wasm_trace,
8317
+ _getentropy,
8318
+ _pthread_cond_signal,
8319
+ _pthread_cond_wait,
8320
+ _pthread_condattr_destroy,
8321
+ _pthread_condattr_init,
8322
+ _pthread_condattr_setclock,
8323
+ _pthread_mutex_trylock,
8324
+ _pthread_mutexattr_destroy,
8325
+ _pthread_mutexattr_init,
8326
+ _pthread_mutexattr_settype,
8327
+ _sched_yield,
8328
+ _sqlite3_auto_extension,
8329
+ _sqlite3_cancel_auto_extension,
8226
8330
  _modf,
8227
8331
  ___ctype_get_mb_cur_max,
8228
8332
  ___extenddftf2,
@@ -8259,6 +8363,7 @@ export function init(RuntimeName, PHPLoader) {
8259
8363
  memory,
8260
8364
  ___stack_pointer,
8261
8365
  __indirect_function_table,
8366
+ ___c_longjmp,
8262
8367
  wasmTable,
8263
8368
  wasmMemory;
8264
8369
  function assignWasmExports(wasmExports) {
@@ -8527,6 +8632,7 @@ export function init(RuntimeName, PHPLoader) {
8527
8632
  _getenv = Module['_getenv'] = wasmExports['getenv'];
8528
8633
  _strlen = Module['_strlen'] = wasmExports['strlen'];
8529
8634
  _memcmp = Module['_memcmp'] = wasmExports['memcmp'];
8635
+ _strtoll = Module['_strtoll'] = wasmExports['strtoll'];
8530
8636
  _malloc =
8531
8637
  PHPLoader['malloc'] =
8532
8638
  Module['_malloc'] =
@@ -8537,6 +8643,12 @@ export function init(RuntimeName, PHPLoader) {
8537
8643
  _memchr = Module['_memchr'] = wasmExports['memchr'];
8538
8644
  _strrchr = Module['_strrchr'] = wasmExports['strrchr'];
8539
8645
  _snprintf = Module['_snprintf'] = wasmExports['snprintf'];
8646
+ ___wasm_setjmp = Module['___wasm_setjmp'] =
8647
+ wasmExports['__wasm_setjmp'];
8648
+ ___wasm_setjmp_test = Module['___wasm_setjmp_test'] =
8649
+ wasmExports['__wasm_setjmp_test'];
8650
+ ___wasm_longjmp = Module['___wasm_longjmp'] =
8651
+ wasmExports['__wasm_longjmp'];
8540
8652
  _pow = Module['_pow'] = wasmExports['pow'];
8541
8653
  _tolower = Module['_tolower'] = wasmExports['tolower'];
8542
8654
  _calloc = wasmExports['calloc'];
@@ -8551,6 +8663,11 @@ export function init(RuntimeName, PHPLoader) {
8551
8663
  _stat = Module['_stat'] = wasmExports['stat'];
8552
8664
  _fopen = Module['_fopen'] = wasmExports['fopen'];
8553
8665
  _open = Module['_open'] = wasmExports['open'];
8666
+ _rename = Module['_rename'] = wasmExports['rename'];
8667
+ _unlink = Module['_unlink'] = wasmExports['unlink'];
8668
+ _mkdir = Module['_mkdir'] = wasmExports['mkdir'];
8669
+ _rmdir = Module['_rmdir'] = wasmExports['rmdir'];
8670
+ _opendir = Module['_opendir'] = wasmExports['opendir'];
8554
8671
  _strncat = Module['_strncat'] = wasmExports['strncat'];
8555
8672
  _abort = Module['_abort'] = wasmExports['abort'];
8556
8673
  _strchr = Module['_strchr'] = wasmExports['strchr'];
@@ -8558,10 +8675,15 @@ export function init(RuntimeName, PHPLoader) {
8558
8675
  _strtok_r = Module['_strtok_r'] = wasmExports['strtok_r'];
8559
8676
  _gettimeofday = Module['_gettimeofday'] = wasmExports['gettimeofday'];
8560
8677
  _strncpy = Module['_strncpy'] = wasmExports['strncpy'];
8678
+ _isalnum = Module['_isalnum'] = wasmExports['isalnum'];
8561
8679
  _close = Module['_close'] = wasmExports['close'];
8680
+ _ftell = Module['_ftell'] = wasmExports['ftell'];
8681
+ _fseek = Module['_fseek'] = wasmExports['fseek'];
8562
8682
  _wasm_read = Module['_wasm_read'] = wasmExports['wasm_read'];
8563
8683
  _feof = Module['_feof'] = wasmExports['feof'];
8564
8684
  _fflush = Module['_fflush'] = wasmExports['fflush'];
8685
+ _closedir = Module['_closedir'] = wasmExports['closedir'];
8686
+ _readdir = Module['_readdir'] = wasmExports['readdir'];
8565
8687
  _siprintf = Module['_siprintf'] = wasmExports['siprintf'];
8566
8688
  _strtol = Module['_strtol'] = wasmExports['strtol'];
8567
8689
  _strtod = Module['_strtod'] = wasmExports['strtod'];
@@ -8592,8 +8714,11 @@ export function init(RuntimeName, PHPLoader) {
8592
8714
  _qsort = Module['_qsort'] = wasmExports['qsort'];
8593
8715
  _rewind = Module['_rewind'] = wasmExports['rewind'];
8594
8716
  _fgets = Module['_fgets'] = wasmExports['fgets'];
8717
+ _writev = Module['_writev'] = wasmExports['writev'];
8595
8718
  _initgroups = Module['_initgroups'] = wasmExports['initgroups'];
8596
8719
  _atol = Module['_atol'] = wasmExports['atol'];
8720
+ _posix_memalign = Module['_posix_memalign'] =
8721
+ wasmExports['posix_memalign'];
8597
8722
  ___wrap_usleep = Module['___wrap_usleep'] =
8598
8723
  wasmExports['__wrap_usleep'];
8599
8724
  ___wrap_select = Module['___wrap_select'] =
@@ -8642,6 +8767,31 @@ export function init(RuntimeName, PHPLoader) {
8642
8767
  Module['_wasm_free'] =
8643
8768
  wasmExports['wasm_free'];
8644
8769
  _wasm_trace = Module['_wasm_trace'] = wasmExports['wasm_trace'];
8770
+ _getentropy = Module['_getentropy'] = wasmExports['getentropy'];
8771
+ _pthread_cond_signal = Module['_pthread_cond_signal'] =
8772
+ wasmExports['pthread_cond_signal'];
8773
+ _pthread_cond_wait = Module['_pthread_cond_wait'] =
8774
+ wasmExports['pthread_cond_wait'];
8775
+ _pthread_condattr_destroy = Module['_pthread_condattr_destroy'] =
8776
+ wasmExports['pthread_condattr_destroy'];
8777
+ _pthread_condattr_init = Module['_pthread_condattr_init'] =
8778
+ wasmExports['pthread_condattr_init'];
8779
+ _pthread_condattr_setclock = Module['_pthread_condattr_setclock'] =
8780
+ wasmExports['pthread_condattr_setclock'];
8781
+ _pthread_mutex_trylock = Module['_pthread_mutex_trylock'] =
8782
+ wasmExports['pthread_mutex_trylock'];
8783
+ _pthread_mutexattr_destroy = Module['_pthread_mutexattr_destroy'] =
8784
+ wasmExports['pthread_mutexattr_destroy'];
8785
+ _pthread_mutexattr_init = Module['_pthread_mutexattr_init'] =
8786
+ wasmExports['pthread_mutexattr_init'];
8787
+ _pthread_mutexattr_settype = Module['_pthread_mutexattr_settype'] =
8788
+ wasmExports['pthread_mutexattr_settype'];
8789
+ _sched_yield = Module['_sched_yield'] = wasmExports['sched_yield'];
8790
+ _sqlite3_auto_extension = Module['_sqlite3_auto_extension'] =
8791
+ wasmExports['sqlite3_auto_extension'];
8792
+ _sqlite3_cancel_auto_extension = Module[
8793
+ '_sqlite3_cancel_auto_extension'
8794
+ ] = wasmExports['sqlite3_cancel_auto_extension'];
8645
8795
  _modf = Module['_modf'] = wasmExports['modf'];
8646
8796
  ___ctype_get_mb_cur_max = Module['___ctype_get_mb_cur_max'] =
8647
8797
  wasmExports['__ctype_get_mb_cur_max'];
@@ -8698,54 +8848,55 @@ export function init(RuntimeName, PHPLoader) {
8698
8848
  wasmExports['__stack_pointer'];
8699
8849
  __indirect_function_table = wasmTable =
8700
8850
  wasmExports['__indirect_function_table'];
8851
+ ___c_longjmp = Module['___c_longjmp'] = wasmExports['__c_longjmp'];
8701
8852
  }
8702
- var _file_globals = (Module['_file_globals'] = 10998528);
8703
- var _sapi_module = (Module['_sapi_module'] = 10947336);
8704
- var _sapi_globals = (Module['_sapi_globals'] = 10947480);
8705
- var _compiler_globals = (Module['_compiler_globals'] = 10931816);
8706
- var _executor_globals = (Module['_executor_globals'] = 10932232);
8707
- var _zend_compile_string = (Module['_zend_compile_string'] = 10933372);
8708
- var _zend_ce_traversable = (Module['_zend_ce_traversable'] = 10923800);
8709
- var _zend_ce_aggregate = (Module['_zend_ce_aggregate'] = 10923804);
8710
- var _zend_ce_iterator = (Module['_zend_ce_iterator'] = 10923808);
8711
- var _zend_ce_arrayaccess = (Module['_zend_ce_arrayaccess'] = 10923812);
8712
- var _zend_ce_serializable = (Module['_zend_ce_serializable'] = 10923816);
8713
- var _zend_ce_countable = (Module['_zend_ce_countable'] = 10923820);
8714
- var _zend_ce_exception = (Module['_zend_ce_exception'] = 10923540);
8715
- var _zend_ce_throwable = (Module['_zend_ce_throwable'] = 10923520);
8716
- var _zend_empty_string = (Module['_zend_empty_string'] = 10921912);
8853
+ var _file_globals = (Module['_file_globals'] = 10998592);
8854
+ var _sapi_module = (Module['_sapi_module'] = 10947400);
8855
+ var _sapi_globals = (Module['_sapi_globals'] = 10947544);
8856
+ var _compiler_globals = (Module['_compiler_globals'] = 10931880);
8857
+ var _executor_globals = (Module['_executor_globals'] = 10932296);
8858
+ var _zend_compile_string = (Module['_zend_compile_string'] = 10933436);
8859
+ var _zend_ce_traversable = (Module['_zend_ce_traversable'] = 10923864);
8860
+ var _zend_ce_aggregate = (Module['_zend_ce_aggregate'] = 10923868);
8861
+ var _zend_ce_iterator = (Module['_zend_ce_iterator'] = 10923872);
8862
+ var _zend_ce_arrayaccess = (Module['_zend_ce_arrayaccess'] = 10923876);
8863
+ var _zend_ce_serializable = (Module['_zend_ce_serializable'] = 10923880);
8864
+ var _zend_ce_countable = (Module['_zend_ce_countable'] = 10923884);
8865
+ var _zend_ce_exception = (Module['_zend_ce_exception'] = 10923604);
8866
+ var _zend_ce_throwable = (Module['_zend_ce_throwable'] = 10923584);
8867
+ var _zend_empty_string = (Module['_zend_empty_string'] = 10921976);
8717
8868
  var _zend_string_init_interned = (Module['_zend_string_init_interned'] =
8718
- 10921980);
8719
- var _zend_one_char_string = (Module['_zend_one_char_string'] = 10921984);
8720
- var _std_object_handlers = (Module['_std_object_handlers'] = 10187096);
8869
+ 10922044);
8870
+ var _zend_one_char_string = (Module['_zend_one_char_string'] = 10922048);
8871
+ var _std_object_handlers = (Module['_std_object_handlers'] = 10187112);
8721
8872
  var ___memory_base = (Module['___memory_base'] = 0);
8722
8873
  var ___table_base = (Module['___table_base'] = 1);
8723
- var _stdout = (Module['_stdout'] = 10915056);
8874
+ var _stdout = (Module['_stdout'] = 10915120);
8724
8875
  var __playground_zend_side_module_data_exports = (Module[
8725
8876
  '__playground_zend_side_module_data_exports'
8726
- ] = 10587552);
8877
+ ] = 10587568);
8727
8878
  var __playground_zend_side_module_function_exports = (Module[
8728
8879
  '__playground_zend_side_module_function_exports'
8729
- ] = 10587632);
8730
- var _timezone = (Module['_timezone'] = 11033424);
8731
- var _tzname = (Module['_tzname'] = 11033432);
8732
- var ___heap_base = 12095872;
8880
+ ] = 10587648);
8881
+ var _timezone = (Module['_timezone'] = 11033488);
8882
+ var _tzname = (Module['_tzname'] = 11033496);
8883
+ var ___heap_base = 12095936;
8733
8884
  var __ZNSt3__25ctypeIcE2idE = (Module['__ZNSt3__25ctypeIcE2idE'] =
8734
- 11047276);
8885
+ 11047340);
8735
8886
  var __ZTVN10__cxxabiv120__si_class_type_infoE = (Module[
8736
8887
  '__ZTVN10__cxxabiv120__si_class_type_infoE'
8737
- ] = 10915344);
8888
+ ] = 10915408);
8738
8889
  var __ZTVN10__cxxabiv117__class_type_infoE = (Module[
8739
8890
  '__ZTVN10__cxxabiv117__class_type_infoE'
8740
- ] = 10915304);
8891
+ ] = 10915368);
8741
8892
  var __ZTVN10__cxxabiv121__vmi_class_type_infoE = (Module[
8742
8893
  '__ZTVN10__cxxabiv121__vmi_class_type_infoE'
8743
- ] = 10915396);
8894
+ ] = 10915460);
8744
8895
  var __ZTISt20bad_array_new_length = (Module[
8745
8896
  '__ZTISt20bad_array_new_length'
8746
- ] = 10915516);
8747
- var __ZTVSt12length_error = (Module['__ZTVSt12length_error'] = 10915592);
8748
- var __ZTISt12length_error = (Module['__ZTISt12length_error'] = 10915612);
8897
+ ] = 10915580);
8898
+ var __ZTVSt12length_error = (Module['__ZTVSt12length_error'] = 10915656);
8899
+ var __ZTISt12length_error = (Module['__ZTISt12length_error'] = 10915676);
8749
8900
  var wasmImports = {
8750
8901
  __assert_fail: ___assert_fail,
8751
8902
  __asyncjs__js_module_onMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web-7-4",
3
- "version": "3.1.33",
3
+ "version": "3.1.35",
4
4
  "description": "PHP 7.4 WebAssembly binaries for web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,10 +35,10 @@
35
35
  "node": ">=20.10.0",
36
36
  "npm": ">=10.2.3"
37
37
  },
38
- "gitHead": "f80a40d763283d582f9b97b0d5eb59bf54d2a943",
38
+ "gitHead": "9d29b73246e12465902d8ce42c0fe747125bc69a",
39
39
  "dependencies": {
40
40
  "wasm-feature-detect": "1.8.0",
41
- "@php-wasm/universal": "3.1.33"
41
+ "@php-wasm/universal": "3.1.35"
42
42
  },
43
43
  "packageManager": "npm@10.9.2",
44
44
  "overrides": {