Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43132 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34740 invoked from network); 20 Feb 2009 22:22:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2009 22:22:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=dpatterson@dplhenterprises.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dpatterson@dplhenterprises.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dplhenterprises.com from 208.43.136.66 cause and error) X-PHP-List-Original-Sender: dpatterson@dplhenterprises.com X-Host-Fingerprint: 208.43.136.66 208.43.136.66-static.reverse.softlayer.com Windows 2000 SP4, XP SP1 Received: from [208.43.136.66] ([208.43.136.66:1302] helo=dplhenterprises.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/E0-28577-73D2F994 for ; Fri, 20 Feb 2009 17:22:47 -0500 Received: from GeneralVM ([68.5.77.14]) by dplhenterprises.com with MailEnable ESMTP; Fri, 20 Feb 2009 14:22:46 -0800 To: Date: Fri, 20 Feb 2009 14:23:00 -0800 Organization: DPLH Enterprises Message-ID: <402EC0719ACD453B94A252DB2DEA8829@dmp.home> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0034_01C99366.BC355990" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6838 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcmTqcn+KvPyA3PsSBag545cx2ZGPw== Subject: Adding a property to an object From: dpatterson@dplhenterprises.com ("David M. Patterson") ------=_NextPart_000_0034_01C99366.BC355990 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello all. =20 I am attempting to convert one of my extensions to OOP. I have a class entry and (I think) I've instantiated an instance of it within RINIT(). What I haven't been able to do is add a private property to it. I have the Goleman book and followed the information on pages 148 and = 149, to no avail. The book says to call zend_mangle_prooperty_name() = specifying the class name as the class name argument. It always fails with "Could not startup." Stepping through with the debugger I find: - zend_mangle_property_name() has worked as described in the book. The property name is \0class\0prop\0. - add_property_double_ex() fails. Actually, the failure is in _zend_property_info() when it explicitly checks the first character of = the passed property name for a null and fails if it is. Searching lxr.php.net hasn't helped so far. =20 Suggestions or a pointer to code that is actually doing this would be = great. By the way, I'm using PHP 5.2.8. Thanks, Dave ------=_NextPart_000_0034_01C99366.BC355990--