PHP
You can use Wasmer in your PHP projects to execute WebAssembly modules securely and conveniently.
In this section we will go through the instructions on how to setup your PHP environment, to then visit different examples of how to use Wasmer in PHP.
To be able to run Wasmer inside our PHP application, we will need PHP to be installed in our system.
To ensure it is installed, let's run the following:
php --version # This will show the PHP version
If this command works, PHP is successfully installed!
Now it's time to create a new project and add Wasmer as a dependency:
mkdir wasmer-project
cd wasmer-project
composer init --name=wasmer-project
composer require wasm/wasm
Before doing that you will have to install the PHP
wasm
extension.Next, let's take a look at some examples!
Last modified 4mo ago