-
Notifications
You must be signed in to change notification settings - Fork 0
ch07_exit_early
Daniel Samson edited this page Jul 6, 2022
·
4 revisions
TeensyPHP provides the stop() method when you wish to exist the process early.
stop(int $code = 0)
<?php
function Authentication() {
// prevent process from going further:
stop(1)
}
You should stop() instead of exit(), as it will enable you to write tests, that capture the the output of controller actions.