chore: prepare repo for php packagist release

This commit is contained in:
Steve Manuel
2022-09-01 19:53:31 -06:00
parent 9ad77a5b60
commit bd3de24218
7 changed files with 169 additions and 1 deletions

10
php/example/Example.php Normal file
View File

@@ -0,0 +1,10 @@
<?php
require("Plugin.php");
$wasm = file_get_contents("../wasm/code.wasm");
$plugin = new Plugin($wasm);
$output = $plugin->call("count_vowels", "this is an example");
$json = json_decode(pack('C*', ...$output));
echo "Vowels counted = " . $json->{'count'} . PHP_EOL;