Functions
Defining functions with function, parameters, return, and default values.
Simple enough for a 5-year-old to understand
function and return
<?phpfunction square($x) { return $x * $x;}echo square(5);🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 17