Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17140 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37579 invoked by uid 1010); 5 Jul 2005 18:41:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37564 invoked from network); 5 Jul 2005 18:41:51 -0000 Received: from unknown (HELO marcus-boerger.de) (127.0.0.1) by localhost with SMTP; 5 Jul 2005 18:41:51 -0000 X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:57275] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 1A/17-10426-E64DAC24 for ; Tue, 05 Jul 2005 14:41:50 -0400 Received: from baumbart.mbo (dsl-082-083-239-151.arcor-ip.net [82.83.239.151]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 7130A35C270; Tue, 5 Jul 2005 20:57:15 +0200 (CEST) Date: Tue, 5 Jul 2005 20:41:52 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <379875860.20050705204152@marcus-boerger.de> To: David Olsson Cc: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] serialize extension objects? From: mail@marcus-boerger.de (Marcus Boerger) Hello David, wait for PHP 5.1 and use the Serializable interface. Otherwise ask on the general list for support. marcus Tuesday, July 5, 2005, 4:16:11 PM, you wrote: > I'm writing an extension for PHP 4 (running version 4.3.10) in C/C++. > The extension provides a set of classes to the PHP programmer (it is, > hence, object oriented). My problem is that some of the objects (or, > rather, references to objects) provided by my extension needs to be > stored in a session and, thus, serialized. I have, however, no idea on > how to provide a custom serialize function for my objects as the > built-in one (for obvious reasons) doesn't work. I have had no luck > finding any useful tips and/or documentation for PHP 4 regarding this > matter. I sincerely hope that someone could point me in the right direction. > Or have I completely misunderstood the entire concept; when storing a > reference to an object (implemented in C/C++), do the object really have > to be serialized? Thanks for all tips! :-) > Best regards > David Olsson -- Best regards, Marcus mailto:mail@marcus-boerger.de