note 38862 added to language.oop
| From: | tiefenbrunner at obdev dot at | Date: | Fri, 09 Jan 2004 10:46:30 +0000 |
| Subject: | note 38862 added to language.oop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-63192@lists.php.net to get a copy of this message | ||
One main difficulty with objects in PHP4 is that objects are likely to be copied whenever assigned
to a variable or passed to/from a function, which is usually not what you want. Things will change
in PHP5, but until PHP5 is widely used by most providers, we have to deal with PHP4's way of
handling objects.
The combination of objects with references can solve this problem, but using references can be quite
tricky. I played around with objects and references in PHP4 for quite a while and the result is the
little guide you can find here:
http://www.obdev.at/developers/articles/00002.html
By reading it and sticking to the rules listed in it you should be able to use objects in PHP4 while
eagerly waiting for PHP5...;-)
----
Manual Page -- http://www.php.net/manual/en/language.oop.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38862
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38862&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38862&report=yes
Search -- http://master.php.net/manage/user-notes.php