PHP code example of runtime / psr-nyholm
1. Go to this page and download the library: Download runtime/psr-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 / psr-nyholm example snippets
// public/index.php
use Psr\Http\Message\ServerRequestInterface;
use Nyholm\Psr7;
00, [], 'PSR-7');
};
// public/index.php
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Nyholm\Psr7;
ew Psr7\Response(200, [], 'PSR-15');
}
}
return function (array $context) {
return new Application($context['APP_ENV'] ?? 'dev');
};