From 2d9481dd9772008f0b402b6d1379b1165b7c7e28 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 24 Oct 2020 15:36:46 +0300 Subject: Modified php, javascript and html file tree --- PHP/Test/calc.php | 17 ++++++ PHP/Test/footer.html | 1 + PHP/Test/header.php | 3 + PHP/Test/index.php | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++ PHP/Test/process.php | 13 +++++ 5 files changed, 189 insertions(+) create mode 100644 PHP/Test/calc.php create mode 100644 PHP/Test/footer.html create mode 100644 PHP/Test/header.php create mode 100644 PHP/Test/index.php create mode 100644 PHP/Test/process.php (limited to 'PHP') diff --git a/PHP/Test/calc.php b/PHP/Test/calc.php new file mode 100644 index 0000000..c2728d9 --- /dev/null +++ b/PHP/Test/calc.php @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/PHP/Test/footer.html b/PHP/Test/footer.html new file mode 100644 index 0000000..9d5e5c6 --- /dev/null +++ b/PHP/Test/footer.html @@ -0,0 +1 @@ +

Subscribe

diff --git a/PHP/Test/header.php b/PHP/Test/header.php new file mode 100644 index 0000000..73c6301 --- /dev/null +++ b/PHP/Test/header.php @@ -0,0 +1,3 @@ + diff --git a/PHP/Test/index.php b/PHP/Test/index.php new file mode 100644 index 0000000..00e4125 --- /dev/null +++ b/PHP/Test/index.php @@ -0,0 +1,155 @@ + + + + + + + + +
+ + +
+ Enter your name: + +
+ + "; + echo str_replace("Jo", "Mo", $workers[0]) . "
"; + echo substr($workers[0], 1, 1) . "
"; + } + + $staff = array("John", "Bob"); + doStuff($staff); + + foreach ($workers as $person) { + echo $person . ", "; + } + ?> + +
+ + "; + + $num = 0; + echo $num++; + echo $num; + + $num = 0; + echo ++$num; + ?> + +
+ +

Calculator

+ +
+ +
+ + + +
+ + + +
+ + + +
+ +
+ + + + + +
+ +
+ +
+ Blue:
+ Red:
+ Yellow:
+ +
+ + + +
+ + 31, "Alex" => 20); + + echo $ages["John"] . $ages["Alex"]; + ?> + +
+ + name = $personName; + $this->setAge($personAge); + } + + function setAge($age) { + if ($age < 0 || $age > 200) { + throw new Exception("Invalid age!", 1); + } + $this->age = $age; + } + + function getAge() { + return $this->age; + } + } + + class Worker extends Person { + + } + + $max = new Worker("Alex", 34); + + //$max->name = "Max"; + //$max->age = 22; + + echo $max->name, $max->getAge(); + ?> + + + + diff --git a/PHP/Test/process.php b/PHP/Test/process.php new file mode 100644 index 0000000..796b517 --- /dev/null +++ b/PHP/Test/process.php @@ -0,0 +1,13 @@ + + + + + + + + + + -- cgit v1.2.3