Run PHP scripts online, no web server needed
Write function main and Waiso runs it on PHP’s own interpreter in an isolated sandbox. The same function runs on a schedule, answers an HTTP endpoint or works as a flow step.
Typed parameters, matched by name
Inputs are matched by name to main’s parameters, typed by string, int, float, bool or array. What main returns is the JSON result, and echo goes to the logs.
Learn more →<?php
function main(float $price, int $discount = 10, string $currency = "USD") {
$final = round($price * (100 - $discount) / 100, 2);
echo "final price $final $currency" . PHP_EOL;
return ["price" => $price, "final" => $final, "currency" => $currency];
}
Built-in functions and the Waiso library
PHP scripts install no packages: they use PHP’s built-in functions. The Waiso library is loaded for you, with Waiso::run, Waiso::flow and Waiso::stateGet.
Learn more →Endpoints without a framework
Publish the script and turn on its endpoint: inputs come from the JSON body or the query string, and the response carries main’s result. It can also run on a schedule or in a flow.
Learn more →Questions
Can I use Composer packages?
No. PHP scripts run with PHP’s built-in functions and the Waiso library only.
Can I choose the PHP version?
No. PHP scripts run on the one version the worker carries and do not record a version.
How is a run with a wrong input handled?
Every trigger checks inputs against main’s parameters before queuing. A value that cannot be used is refused with HTTP 422 and nothing runs.