From 3580630871868ba99dfdfd92d60913829fb25b13 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 4 Jun 2025 13:38:09 +0000 Subject: [PATCH] Php example maked --- index.php | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index ef4660f..a67f691 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,24 @@ - \ No newline at end of file +exampleVariable = $value; // assigns value to the instance variable + } + + // Function that adds two numbers + public function add($number1, $number2) { + return $number1 + $number2; // returns the sum + } +} + +// Example function: multiplies two numbers +function multiply($number1, $number2) { + return $number1 * $number2; // returns the product +} + +// Array example +$sampleArray = [1, 2, 3, 4, 5]; // array of numbers +?>