summaryrefslogtreecommitdiff
path: root/tests/abstract.php
diff options
context:
space:
mode:
authorGeo Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2026-07-12 15:51:52 +0300
committerGeo Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2026-07-12 15:51:52 +0300
commit02608271bb2a9f3a65ed536984d306ee14b48e34 (patch)
tree3f23ec48a694ec014e845c4f70d9b5f1c065403c /tests/abstract.php
downloadkalassa-02608271bb2a9f3a65ed536984d306ee14b48e34.tar.gz
kalassa-02608271bb2a9f3a65ed536984d306ee14b48e34.tar.bz2
kalassa-02608271bb2a9f3a65ed536984d306ee14b48e34.zip
initialize repository; add docker config; migrate configuration to new specsHEADmaster
Diffstat (limited to 'tests/abstract.php')
-rwxr-xr-xtests/abstract.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/abstract.php b/tests/abstract.php
new file mode 100755
index 0000000..2b085a4
--- /dev/null
+++ b/tests/abstract.php
@@ -0,0 +1,46 @@
+<?php
+
+abstract class abs {
+
+ public static $abs = [
+ 'one' => 10,
+ 'to' => [20, 220],
+ 'tree' => [30, [330, 3330]]
+ ];
+
+ public static function foo($who) {
+ print_r(static::$abs[$who]);
+ }
+
+}
+
+class Xtra extends abs {
+
+ public static $abs = [
+ 'Oh' => 'Yoo hoo!',
+ 'my' => ['babe', 'be', 'mine']
+ ];
+
+ // overide method
+ public static function foo($who) {
+ print_r(['overiding', $who, 'my']);
+ }
+
+}
+
+class Repo extends abs {
+ public static $abs = [
+ 'one' => 1,
+ 'to' => [2, 22],
+ 'tree' => [3, [33, 333]]
+ ];
+}
+
+class Neva extends abs {
+ // use abstract's (default) array
+}
+
+Xtra::foo('Oh');
+Repo::foo('to');
+Neva::foo('tree');
+