PHP code example of nubium / this-should-never-happen-exception
1. Go to this page and download the library: Download nubium/this-should-never-happen-exception 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/ */
nubium / this-should-never-happen-exception example snippets
php
switch ($oneOrTwoNothingElse) {
case 1:
echo 1;
break;
case 2:
echo 2;
break;
default:
throw new ThisShouldNeverHappenException('Unexpected input.');
}