PHP code example of runtime / psr-laminas

1. Go to this page and download the library: Download runtime/psr-laminas 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-laminas example snippets


// public/index.php

use Psr\Http\Server\RequestHandlerInterface;

 = new \Laminas\Diactoros\Response();
    $response->getBody()->write('PSR-7');

    return $response;
};

// public/index.php

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


        $response = new \Laminas\Diactoros\Response();
        $response->getBody()->write('PSR-15');

        return $response;
    }
}

return function (array $context) {
    return new Application($context['APP_ENV'] ?? 'dev');
};