Skip to content

Commit cfbc0e5

Browse files
committed
New code with functions added
1 parent 406141d commit cfbc0e5

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

php-training/exercise 1/.DS_Store

6 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"git.ignoreLimitWarning": true
3+
}

php-training/exercise 1/1.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
$x = 5;
4+
$y = 4;
5+
6+
function Add($x, $y) {
7+
return $x + $y;
8+
}
9+
10+
echo Add(10, 15) . "\n";
11+
12+
$a = 20;
13+
$b = 5;
14+
15+
function Substract($a, $b) {
16+
return $a - $b;
17+
}
18+
echo $a - $b . "\n";
19+
20+
$p = 30;
21+
$r = 25;
22+
23+
function Multiply($p, $r) {
24+
return $p * $r;
25+
}
26+
27+
echo $p * $r ."\n";
28+
29+
$x = 7;
30+
$y = 3;
31+
function Divide($x, $y) {
32+
return $x / $y;
33+
}
34+
35+
echo $x / $y . "\n";
36+
37+
38+
39+

0 commit comments

Comments
 (0)