Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17137 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2066 invoked by uid 1010); 5 Jul 2005 14:45:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 2050 invoked from network); 5 Jul 2005 14:45:29 -0000 Received: from unknown (HELO vimio.com) (127.0.0.1) by localhost with SMTP; 5 Jul 2005 14:45:29 -0000 Received: from ([127.0.0.1:19878]) by pb1.pair.com (ecelerity 1.2 r(5656M)) with ECSTREAM id CA/E1-22412-80D9AC24 for ; Tue, 05 Jul 2005 10:45:28 -0400 X-Host-Fingerprint: 212.32.183.87 87.183.32.ip.nordiq.net Received: from ([212.32.183.87:25221] helo=localhost.localdomain) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id B6/70-06508-8269AC24 for ; Tue, 05 Jul 2005 10:16:08 -0400 Message-ID: To: internals@lists.php.net Date: Tue, 05 Jul 2005 16:16:11 +0200 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.32.183.87 Subject: serialize extension objects? From: david.olsson@vimio.com (David Olsson) 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