# [PHP-CVS] cvs: php-src /ext/simplexml simplexml.c

- Thread: https://externals.io/message/7789
- Original archive: https://news-web.php.net/php.internals/7789
- Started by Andrei Zmievski on 2004-02-12T20:37:35+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #7789 — Andrei Zmievski — 2004-02-12T20:37:35+00:00

URL: https://externals.io/message/7789#7789

> zeev		Wed Feb 11 14:15:34 2004 EDT
> 
>   Modified files:              
>     /php-src/ext/simplexml	simplexml.c 
>   Log:
>   Prevent SimpleXML from silently modifying types of variables that are
>   assigned to its objects.
>   
>   Implementation notes for overloaded object modules:
>   
>   - If you return a zval which is not otherwise referenced by the extension
>     or the engine's symbol table, its reference count should be 0.
>   - If you receive a value zval in write_property/write_dimension, you
>     may only modify it if its reference count is 1.  Otherwise, you must
>     create a copy of that zval before making any changes.  You should NOT
>     modify the reference count of the value passed to you.

Can you put it in OBJECTS2_HOWTO or somewhere similar? It really should
be well documented.

- Andrei
