note 93303 added to language.oop5
| From: | AlexanderBouz at osu1 dot php dot net | Date: | Wed, 02 Sep 2009 08:26:17 +0000 |
| Subject: | note 93303 added to language.oop5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160151@lists.php.net to get a copy of this message | ||
To what Jason wrote below:
Instead of casting an array to an object to create a new empty object, you could also instantiate an
object of stdClass
<?php
$test = new stdClass();
$test->example = "George Orwell";
// prints George Orwell
echo $test->example;
?>
----
Server IP: 69.147.83.197
Probable Submitter: 62.99.199.203
----
Manual Page -- http://www.php.net/manual/en/language.oop5.php
Edit -- https://master.php.net/note/edit/93303
Del: integrated -- https://master.php.net/note/delete/93303/integrated
Del: useless -- https://master.php.net/note/delete/93303/useless
Del: bad code -- https://master.php.net/note/delete/93303/bad+code
Del: spam -- https://master.php.net/note/delete/93303/spam
Del: non-english -- https://master.php.net/note/delete/93303/non-english
Del: in docs -- https://master.php.net/note/delete/93303/in+docs
Del: other reasons-- https://master.php.net/note/delete/93303
Reject -- https://master.php.net/note/reject/93303
Search -- https://master.php.net/manage/user-notes.php