PHP 5 Beta 3

php.internals

l0t3k

22 years ago
Two things that need fixing : 1. support for class constants for internal classes. Christiano has already posted a patch. 2. session support for internal classes. should we have a Serializable interface which classes inherit, or have sleep and wakeup handlers in the zend_object_handlers structure ? l0t3k

Andi Gutmans

22 years ago
At 12:22 AM 11/13/2003 -0500, l0t3k wrote:
>Two things that need fixing : > 1. support for class constants for internal classes. Christiano has >already posted a patch.
I applied his patch. As I told him I don't think persistent internal classes across requests will be supported with all the bells and whistles. In general they should work but I expect more problems to be found such as not being able to initialize constants with arrays (which is no big deal IMO).
> 2. session support for internal classes. should we have a Serializable >interface which classes inherit, or have sleep and wakeup > handlers in the zend_object_handlers structure ?
I guess it's possible. In most cases I think internal classes won't be serialized though, such as COM. I don't think it needs fixing though. It's something which can be added whenever... Andi

Wez Furlong

22 years ago
> > 2. session support for internal classes. should we have a
Serializable
> >interface which classes inherit, or have sleep and wakeup > > handlers in the zend_object_handlers structure ? > > I guess it's possible. In most cases I think internal classes won't be > serialized though, such as COM. I don't think it needs fixing though. It's > something which can be added whenever...
Actually, people have already tried to serialize PHP5 COM objects and hit a segfault :-) It should be reasonably simple to serialize COM objects (there are a bunch of IPersistXXX interfaces we could use); the limitation right now is that our internals don't provide a sane way to implement it. I can probably whip up a serialization interface over the weekend; it would work a bit like the iterators stuff - driven by a C interface that could wrap a userspace implementation if desired (although I'd be more interested in the internals here). --Wez.

Andi Gutmans

22 years ago
At 11:03 AM 11/13/2003 +0000, Wez Furlong wrote:
> > > 2. session support for internal classes. should we have a >Serializable > > >interface which classes inherit, or have sleep and wakeup > > > handlers in the zend_object_handlers structure ? > > > > I guess it's possible. In most cases I think internal classes won't be > > serialized though, such as COM. I don't think it needs fixing though. It's > > something which can be added whenever... > >Actually, people have already tried to serialize PHP5 COM objects >and hit a segfault :-) > >It should be reasonably simple to serialize COM objects (there are >a bunch of IPersistXXX interfaces we could use); the limitation right >now is that our internals don't provide a sane way to implement it. > >I can probably whip up a serialization interface over the weekend; >it would work a bit like the iterators stuff - driven by a C interface >that could wrap a userspace implementation if desired (although I'd >be more interested in the internals here).
Sounds fine to me. Andi