abort()
Aborts the next script execution with a message.
Table of Contents
Description
abort(string $alert, bool $exit = true): void;
This function aborts the next script execution with a message to make it easier for other users to find out why the script was aborted. The generated HTML output will also provide a trace to make it easier to find the source of the error. It is always recommended to execute this function in a conditional test mode.
Example
if (defined('TEST') && TEST && (!defined('VERSION') || version_compare(VERSION, '3.0.0', '<'))) {
abort('This extension is not compatible with your core application version.');
}
// Your extension code goes here…
abort()
Aborts the next script execution with a message.
test()
Inspects the output of a PHP code.