PHP code example of azjezz / roew
1. Go to this page and download the library: Download azjezz/roew 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/ */
azjezz / roew example snippets
use Roew as w;
$wrapper = w\result(5);
assert($wrapper->isSucceeded());
$result = $wrapper->getResult();
$wrapper = w\exception(new Exception('failed'));
assert($wrapper->isFailed());
$e = $wrapper->getException();
$wrapper = w\wrap(
fn() => bin2hex(random_bytes(32))
);
if ($wrapper->isSucceeded()) {
echo 'Succeeded : '.$wrapper->getResult();
} else {
echo 'Failed : '.$wrapper->getException()->getMessage();
}