From php.net :
Returns processing: include returns FALSE on failure and raises a warning. Successful includes, if not overridden by the included file, return 1. You can execute the return statement inside the included file to complete processing in this file and return to the script that named it. In addition, it is possible to return values from the included files. You can accept the value of the incoming call as you are for a normal function. However, this is not possible if including deleted files, if the output of the deleted file is not valid PHP start and end tags (as in any local file). You can declare the necessary variables in these tags, and they will depend on which file was included.
If your class/view.php or config/test.php uses return , you can save it. If there is no return in these files, there is no reason if you do not want the current script to continue.
Example 1:
<?php echo 1; // < executes return include 'somefile.php'; // < script will end here because of "return" echo 2; // < not executes ever ?>
Example 2:
<?php echo 1; // < executes include 'somefile.php'; // < executes echo 2; // < executes ?>
source share