On Wed, 2007-03-21 at 18:09 -0300, Martin Alterisio wrote:
>
> Actually, is not a bug, is expected behaviour and documented in the manual
> 
> http://php.net/static
> 
> See the last section, named "references with global and static variables"
> 
> static and global are implemented internally as references, that makes
> storing references into static variables impossible (which can be solved by
> using arrays of references as seen in Robert Cummings example).

Thanks for the tip, I've never actually had to use a static var to store
an object reference, usually I use singletons and properties or my
static vars just store scalars or arrays. Good to know though, since I
didn't think to check the documented behaviour... fortunately I didn't
get around to posting a bug report either :)

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to