go1/util_fn

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Maintainers

Package info

github.com/go1com/util_fn

pkg:composer/go1/util_fn

Statistics

Installs: 678

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

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

This package is auto-updated.

Last update: 2024-05-14 01:31:13 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/.