summaryrefslogtreecommitdiff
path: root/php
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-14 16:46:27 +0200
committerPatrick Simianer <p@simianer.de>2014-06-14 16:46:27 +0200
commit26c490f404731d053a6205719b6246502c07b449 (patch)
tree3aa721098f1251dfbf2249ecd2736434c13b1d48 /php
init
Diffstat (limited to 'php')
-rw-r--r--php/class.php25
-rw-r--r--php/for.php7
2 files changed, 32 insertions, 0 deletions
diff --git a/php/class.php b/php/class.php
new file mode 100644
index 0000000..a2d7875
--- /dev/null
+++ b/php/class.php
@@ -0,0 +1,25 @@
+<?php
+
+class Foo {
+ public $aMemberVar = 'aMemberVar Member Variable';
+ public $aFuncName = 'aMemberFunc';
+ private $anotherVar = 'xxx';
+
+ function aMemberFunc() {
+ return 'Inside `aMemberFunc()`';
+ }
+}
+
+$foo = new Foo;
+
+$s = "asdf ";
+$s .= $foo->aMemberFunc();
+$s .= " xxx";
+//$s .= $foo->anotherVar;
+$s .= "\n";
+echo $s;
+
+$x = 2+3;
+echo $x;
+?>
+
diff --git a/php/for.php b/php/for.php
new file mode 100644
index 0000000..e8f959a
--- /dev/null
+++ b/php/for.php
@@ -0,0 +1,7 @@
+<?php
+
+for ($i = 0; $i < 2; $i++) {
+ echo $i."\n";
+}
+?>
+