Anzeigen der neuesten Beiträge
0 Mitglieder und 3 Gäste betrachten dieses Thema.
function functionName(arguments) { code to be executed; }
function min($x, $y) { if ($x < $y) { return $x; } else { return $y; } }
echo min(42, 23); //returns 23
include "math.inc"; echo multiply(3, 4) + divide(9, 3); // 12 + 3 = 15
// math.inc function sum($x, $y) { return $x + $y; } function diff($x, $y) { return $x - $y; } function multiply($x, $y) { return $x * $y; } function divide($x, $y) { return $x / $y; }