summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail_test.php12
-rw-r--r--oo/blank_object.php5
2 files changed, 17 insertions, 0 deletions
diff --git a/mail_test.php b/mail_test.php
new file mode 100644
index 0000000..8d77166
--- /dev/null
+++ b/mail_test.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: kyle
+ * Date: 4/10/14
+ * Time: 10:22 AM
+ */
+
+error_reporting(E_ALL);
+
+if (mail('root@localhost', 'this is a subject', 'this is a 1 line message'))
+ print 'mail successfully sent';
diff --git a/oo/blank_object.php b/oo/blank_object.php
index 25803d0..751402e 100644
--- a/oo/blank_object.php
+++ b/oo/blank_object.php
@@ -5,6 +5,11 @@
* When you cast a scalar or array as Object, you get an instance of stdClass. Bare bones data structure for key-val entries
*/
+$obj_w_scalar = (object) 'bar';
+print $obj_w_scalar->scalar . PHP_EOL;
+foreach ($obj_w_scalar as $key => $val)
+ print "'$key' <--> '$val'" . PHP_EOL;
+
$obj = new StdClass();
$obj->foo = 'bar';