sudhakarinfotech
(current)
Run Code
PHP Code Editor-
PHP Source Code
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>PHP Function With Return Statement</title> </head> <body> <h1>PHP Function With Return Statement</h1> <?php function addNumber($x, $y) { $sum = $x + $y; return $sum; } $returnedValue = addNumber(20, 70); echo "Function returned the summation of two number: $returnedValue"; ?> </body> </html>
Source Code Output