Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Function that returns a value
SUBMITTED BY:
henry1874w
DATE:
June 17, 2017, 1:05 p.m.
FORMAT:
Text only
SIZE:
237 Bytes
Raw
Download
Tweet
HITS:
336
Go to comments
Report
<!DOCTYPE html>
<html>
<body>
<?php
function sum($x, $y) {
$z = $x + $y;
return $z;
}
echo "5 + 10 = " . sum(5,10) . "<br>";
echo "7 + 13 = " . sum(7,13) . "<br>";
echo "2 + 4 = " . sum(2,4);
?>
</body>
</html>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus