summaryrefslogtreecommitdiffstats
path: root/oo/blank_object.php
diff options
context:
space:
mode:
Diffstat (limited to 'oo/blank_object.php')
-rw-r--r--oo/blank_object.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/oo/blank_object.php b/oo/blank_object.php
new file mode 100644
index 0000000..25803d0
--- /dev/null
+++ b/oo/blank_object.php
@@ -0,0 +1,10 @@
+<?php
+
+/* stdClass is the default PHP object. stdClass has no properties, methods or parent.
+ * It does not support magic methods, and implements no interfaces.
+ * When you cast a scalar or array as Object, you get an instance of stdClass. Bare bones data structure for key-val entries
+ */
+
+$obj = new StdClass();
+$obj->foo = 'bar';
+