PHP return Keyword

PHP static Keyword
PHP require_Once Keyword

In this article, you will learn how to use the return keyword in PHP. The return keyword in PHP ends a function and, optionally, uses the result of an expression as the return value of the function.

examples of the RETURN function

Example 1. In this example, we return a value from a function.

<?php
function add1($x) {
  return $x + 1;
}

echo "5 + 1 is " . add1(5);
?>
PHP static Keyword
PHP require_Once Keyword
en English
X
Scroll to Top