1.2.995. Print And Die¶
Die() also prints.
When stopping a script with die(), it is possible to provide a message as first argument, that will be displayed at execution. There is no need to make a specific call to print or echo.
<?php
// die may do both print and die.
echo 'Error message';
die();
// exit may do both print and die.
print 'Error message';
exit;
// exit cannot print integers only : they will be used as status report to the system.
print 'Error message';
exit 1;
?>
1.2.995.1. Connex PHP features¶
1.2.995.1.1. Specs¶
Short name |
Structures/PrintAndDie |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Instant (5 mins) |
Precision |
Very high |
Available in |