Tutorialspoint

PHP7 Valid Return Type

<?php
   ini_set('assert.exception', 1);

   class CustomError extends AssertionError {}

   assert(false, new CustomError('Custom Error Message!'));
?>

Advertisements
Loading...