PHP code example of try / predict-is
1. Go to this page and download the library: Download try/predict-is 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/ */
try / predict-is example snippets
TryPhp\PredictIsTrait;
$assertions = new class() {
use PredictIsTrait();
}
$assertions->is(3, 3); // won't throw an exception
$assertions->predictException('something', 'something else'); // will throw an exception