Skip to content
@true-async

True Async

Implementation of native asynchrony at the PHP core level

PHP TRUE ASYNC

PHP TRUE ASYNC brings native asynchronous programming to PHP core.

Project Structure

⚙️ PHP Core

  • true-async branch — TrueAsync API + PHP core changes and related libraries
  • true-async-api branch — TrueAsync API only

🔌 True Async extention

php-async — Extension implementing the TrueAsync API

📄 RFC

php-true-async-rfcRFC and documentation

Installation

🐧 Unix

  1. Clone the PHP repository:

    for example, basic directory name is php-src:

    git clone https://github.com/true-async/php-src -b true-async-api ./php-src
    
  2. Clone the True Async extension repository:

    to the ext directory of your PHP source:

    git clone https://github.com/true-async/php-async ./php-src/ext/async
    
  3. Install PHP development tools:

    Make sure you have the necessary development tools installed. On Debian/Ubuntu, you can run:

    sudo apt-get install php-dev build-essential autoconf libtool pkg-config
    

    For macOS, you can use Homebrew:

    brew install autoconf automake libtool pkg-config
    
  4. Install LibUV::

Please see the LibUV installation guide

  1. Configure and build:

    ./buildconf
    ./configure --enable-async
    make && sudo make install
    

    We can use --enable-debug to enable debug mode, which is useful for development.


🖥️ Windows

  1. Install php-sdk:
    Download and set up php-sdk for building PHP extensions on Windows.

  2. Install and build LibUV:
    You can use vcpkg or build libuv from source.

  3. Copy LibUV files to PHP SDK directories:

    1. Copy everything from 'libuv\include' to '%PHP_SDK_PATH%\deps\include\libuv\'
    2. Copy 'libuv.lib' to '%PHP_SDK_PATH%\deps\lib\'
    

    %PHP_SDK_PATH% is your php-sdk installation root.

  4. Configure and build the extension with PHP:

    cd \path\to\php-src
    buildconf
    configure --enable-async
    nmake
    

Contacts

💬 Discord Discussions


PHP TRUE ASYNC — making async a standard in PHP!

Pinned Loading

  1. php-async php-async Public

    PHP Async extension

    C 42

  2. php-true-async-rfc php-true-async-rfc Public

    Forked from EdmondDantes/php-true-async-rfc

    PHP TRUE ASYNC RFC

    11

  3. php-src php-src Public

    Forked from php/php-src

    The PHP Interpreter

    C 2

Repositories

Showing 4 of 4 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

C

Most used topics

Loading…