PHPfunction Keyword
Example
Create a function and run it:
<?php
function hello($a) {
return "Hello $a!";
}
echo hello("World");
?>
Try it Yourself »function hello($a) {
return "Hello $a!";
}
echo hello("World");
?>
Definition and Usage
Thefunction keyword is used to create a function.
Related Pages
Read more about functions in ourPHP Functions Tutorial.
❮ PHP Keywords

