Date: 10/28/99
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: kk: "[PHPLIB-DEV] cvs commit"
- In reply to: Boris Erdmann: "[PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal"
- Next in thread: Kristian Koehntopp: "Re: serialize() (was Re: [PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal)"
- Reply: Kristian Koehntopp: "Re: serialize() (was Re: [PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Oct 28, 1999 at 12:42:31PM +0200, Boris Erdmann wrote:
>
> The old serializer should painlessly be replaceble by
> the following (maybe with little modifications at
> where _serialize() is called):
Just to throw an idea into the discussion: Why don't we use
PHP's built-in serialization for primitive data types?
There are a number of advantages:
- eval leaks memory
- ereg_replace is slow
For example, Boris' code used
eval('$ser.="$$var=\'".ereg_replace("\'","\\\'",$'.$var.')."\';";');
this could be rewritten as
$ser .= "\$$var=unserialize('".serialize($$var)."');";
Do I miss anything?
--Regards,
Sascha Schumann Consultant - PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>. To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in the body, not the subject, of your message.
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: kk: "[PHPLIB-DEV] cvs commit"
- In reply to: Boris Erdmann: "[PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal"
- Next in thread: Kristian Koehntopp: "Re: serialize() (was Re: [PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal)"
- Reply: Kristian Koehntopp: "Re: serialize() (was Re: [PHPLIB-DEV] Re: [PHPLIB] phplib - changes proposal)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

