Another function of the PHP return statement, the return statement
Always think that return can only appear in the function until the bbpress code is seen:
<?phprequire_once ('./bb-load.php '); Bb_repermalink (); The magic Happens Here.if ($self) {if (Strpos ($self, '. php ')!== false) { require ($self);} else { require (Bb_path. ' profile-base.php '); } return;
Can return still appear outside of the function? This is unthinkable in the C language.
Check the PHP manual: If you call the return statement in a function, the execution of the function is terminated immediately and its arguments are returned as the value of the function. If called in the global scope, the current script file aborts the run.
Alas, it's too deep to be poisoned by C.
What is the use of return in PHP and its actual effect?
The use of return is actually not difficult, it means to return;
If a return is executed, the contents after the return statement will not be executed;
Return can be a function return value, or it can return a null value, depending on your specific usage, for example:
function test ($a) {
if ($a >10) {
return "A>10";
}else{
return "A<10";
}
$b = 45;
$c = $b-$a;
Echo $c;
}
In this example, when you call this function and then give any number, it will return a string, and the code: $b = 45;
$c = $b-$a;
Echo $c;
Will never be executed
Problems with the return statement in PHP
Return is back AH.
Echo is the output. You can also print
Return is not an output,
http://www.bkjia.com/PHPjc/854360.html www.bkjia.com true http://www.bkjia.com/PHPjc/854360.html techarticle another function of the PHP return statement, the return statement has always assumed that return can only appear in the function until the bbpress code is seen: Phprequire_once ('./bb-load.php '); bb_ Repermalink (); /...