PHP code example of request-interop / impl

1. Go to this page and download the library: Download request-interop/impl 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/ */

    

request-interop / impl example snippets


use RequestInterop\Impl\Readonly\ReadonlyRequest;
use RequestInterop\Impl\Readonly\ReadonlyRequestFactory;

$factory = new ReadonlyRequestFactory();
$request = $factory->newRequest();
assert($request instanceof ReadonlyRequest::class);

use RequestInterop\Impl\Mutable\MutableRequest;
use RequestInterop\Impl\Mutable\MutableRequestFactory;

$factory = new MutableRequestFactory();
$request = $factory->newRequest();
assert($request instanceof MutableRequest::class);