PHP Return statement alternative usage, Phpreturn statement alternative
Share another function of the PHP return statement, and see a wonderful way to use it in the Bbpress code.
Always think that return can only appear in the function until the bbpress code is seen:
PHPrequire_once('./bb-load.php '// The magic happens here. if $self {ifstrpos($selffalse ) {require( $self Else {require(Bb_path). ' profile-base.php ' );} www.jbxue.comreturn;}
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.
Problems with the return statement in PHP
Return is back AH.
Echo is the output. You can also print
Return is not an output,
Questions about return statements in PHP functions
Yes, logically, when executing to a return, the following statement is no longer executed, and if one is not executed, the following may be executed.
But the second return in this program is not used, and will never be executed.
http://www.bkjia.com/PHPjc/854730.html www.bkjia.com true http://www.bkjia.com/PHPjc/854730.html techarticle PHP Return statement alternative usage, Phpreturn statement alternative sharing under the PHP return statement of another role, in the Bbpress code to see a wonderful way to use. Always thought, return only ...