PHP code example of marcosh / effector
1. Go to this page and download the library: Download marcosh/effector library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
marcosh / effector example snippets
$effect = new Echo_();
$effect('hello!');
$websiteLogic = function (RequestInterface $request): ResponseInterface { ... }
$app = Compose::pieces(
new ReceiveRequest(),
$websiteLogic,
new EmitResponse()
);
bash
php example/ArgvEcho.php
docker run --rm -ti -v "$(pwd):/app" --workdir /app php:7.1-cli php example/ArgvEcho.php
bash
php -S localhost:8000 example/Http.php