go1/util_fn

dev-master 2021-09-16 03:21 UTC

This package is auto-updated.

Last update: 2024-04-16 08:44:56 UTC


README

Simple library to build tiny PHP application:

  • Input: stdIn
  • Output: stdOut
  • No HTTP server.
  • No RESTful.

Usage

<?php

go1\util_fn\FnRunner::run(
    function (go1\util_fn\FnRunner $fn, stdClass $payload) {
        return "Hello {$payload->name}!\n";
    }
);

Execute it: echo '{"name":"world"}' | php hello-world.php

More examples can be found under ./examples/.