Return Statements Explained, What is a Return Statement in PHP, Codecademy PHP, Return Statements

Welcome back to Codecademy’s Learn PHP, today we are looking at Return Statements Explained, What is a Return Statement in PHP, Codecademy PHP, Return Statements. We learn that as we create more complex functions we will often use them to process data. If we want our data to be helpful, functions have the ability to return a value in addition to performing sets of instructions. We are able to return values using a return statement. To use a return statement in PHP we use the “return” keyword, followed by what we want to be returned. We are then able to capture the return value in a variable for later use. The function return statement we see in our example is a bit silly, but the ability to return a value is extremely powerful and useful. Practice creating return values in your functions and try to understand how return statements work by creating your own functions with return statements. Make sure to understand return statements in PHP before moving on. Learn about PHP return statements in functions and truly begin to master PHP. Becoming a professional PHP developer takes time and patience. Make sure to take your time breaking down return statements to really understand how return statements work. Thanks for watching Return Statements Explained, What is a Return Statement in PHP, Codecademy PHP, Return Statements.