Source Code:
(back to article)
<?php // Example 1 function add($a, $b) { return $a + $b; } echo add(5, 3) . PHP_EOL; // Output: 8 // Example 2 function greeting($name) { echo "Hello, " . $name . "!"; } greeting("John"); // Output: Hello, John!
Result:
Report an issue