Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77565 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9073 invoked from network); 24 Sep 2014 05:30:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2014 05:30:41 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.75 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.75 smtp75.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.75] ([108.166.43.75:33933] helo=smtp75.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/20-03797-FF652245 for ; Wed, 24 Sep 2014 01:30:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp26.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id A28A738027E; Wed, 24 Sep 2014 01:30:37 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp26.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 2AD6D380202; Wed, 24 Sep 2014 01:30:37 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.13); Wed, 24 Sep 2014 05:30:37 GMT Message-ID: <542256FC.1020601@sugarcrm.com> Date: Tue, 23 Sep 2014 22:30:36 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Kalle Sommer Nielsen , Park Framework CC: PHP internals References: <5421EB4A.4000101@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Improve PHP 7 serialization From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > There is an even better way to do this; add an additional parameter to > serialize and unserialize to serialize as and unserialize as: > > $bin = serialize($data_struct, 'igbinary'); > $data_struct = unserialize($bin, 'igbinary'); This is cleaner, but if you can do this (code change), why you can't do just igbinary_serialize($data_struct)? > 3) Optionally add a function like: get_serialize_handlers() (so we > won't have to parse phpinfo()) which are the available serializers That actually makes a lot of sense, but serialize_get_handlers() might be a better name, to group them together. But right now I don't think we have such list, do we? We have php_session_register_serializer() and the list for sessions, but not for other contexts. > 6) Allow users to register serialize handlers using > register_serialize_handler()/unregister_serialize_handler() Do you think userspace serialize handlers would be popular? They would be by necessity pretty slow compared to C ones. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/