Remix.run Logo
▲ beberlei 2 hours ago

Most excited about the ZTS overhead reduction. If you are unfamiliar PHP can run either with or without thread safety (think using pthreads in PHP requests).

If the overhead can be further reduced (and people have ideas) then it could be that we only need ZTS mode anymore in the future and that can open up one avenue for PHP to get native async support similar to the existing parallel extension: https://github.com/krakjoe/parallel

More "hands-on" is the stream error handling improvements. This greatly improves the old file stream APIs to now allow throwing exceptions instead of returning false on errors:

  $context = stream_context_create([
    'stream' => [
        'error_mode' => StreamErrorMode::Exception,
    ],
  ]);

  try {
    $config = file_get_contents('/etc/app/config.json', context: $context);
  } catch (StreamException $e) {
    // handle error
  }
▲calvinmorrison 22 minutes ago | parent [-]

That's certainly a use case but I worry async opens the door for all the non PHP to come on in