PHP code example of runtime / roadrunner-nyholm

1. Go to this page and download the library: Download runtime/roadrunner-nyholm 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/ */

    

runtime / roadrunner-nyholm example snippets


// public/index.php

use Psr\Http\Message\ServerRequestInterface;

$request) {
        return new \Nyholm\Psr7\Response(200, [], 'Hello PSR-7');
    };
};


// public/index.php

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;

turn new \Nyholm\Psr7\Response(200, [], 'Hello PSR-15');
    }
}

return function () {
    return new Application();
};