1. Go to this page and download the library: Download aphonix/option 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/ */
aphonix / option example snippets
use function Aphonix\Option\{Some, None};
// Wrap a value that exists
$some = Some("Aphonix");
// Represent the absence of a value
$none = None();
if ($some->is_some()) {
echo $some->unwrap(); // Output: Aphonix
}