diff options
author | Kyle Kaminski <kyle@xenomedia.com> | 2014-05-12 23:46:56 -0500 |
---|---|---|
committer | Kyle Kaminski <kyle@xenomedia.com> | 2014-05-12 23:46:56 -0500 |
commit | c815b1b4c2b3f05edfa17e9837476da15f902ccd (patch) | |
tree | f95b7917d5f78c2a0d57de46de87f901a52d2ff2 | |
parent | 5bc445bd93153f26bc520ba6ca91a86bbc8a5804 (diff) | |
download | phpsandbox-c815b1b4c2b3f05edfa17e9837476da15f902ccd.tar.gz phpsandbox-c815b1b4c2b3f05edfa17e9837476da15f902ccd.tar.bz2 phpsandbox-c815b1b4c2b3f05edfa17e9837476da15f902ccd.zip |
add way to test mail()
-rw-r--r-- | mail_test.php | 12 | ||||
-rw-r--r-- | oo/blank_object.php | 5 |
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'; |