PHP WASM Example

This experiment would not have been possible were it not for the efforts of the WordPress Playground, Derick Rethans, developers behind wasm and PHP. It's a public experiment into running multiple PHP versions via WASM to run code examples.

It is heavily based upon WordPress playground patches, php-wasm and Derick's php-wasm-builder.

This also "borrowed" some code for the HTML and JS to run this experiment from PHP.net documentation.

Examples

Example #1 Lewis is an idiot and wanted to use PHP.net JS example

Sort of a hello-world example

<?php
echo "Hello World!";
?>

The above example will output:

string(0) Hello World!