Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88560 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10006 invoked from network); 29 Sep 2015 16:29:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2015 16:29:43 -0000 Authentication-Results: pb1.pair.com header.from=codekestrel@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=codekestrel@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: codekestrel@googlemail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:33136] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/B0-05836-77CBA065 for ; Tue, 29 Sep 2015 12:29:43 -0400 Received: by wiclk2 with SMTP id lk2so159589199wic.0 for ; Tue, 29 Sep 2015 09:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yIoVOgvT8TcclSM6DkiVO+0tBdrnV+48ODJi3zcUMsg=; b=hscZSr9WLLZesXB06DGgIMo9f7QtGAQJ+/qLW7gtuZYs1RsvIKS8dnkYsptsKwbq8S 8pBWsqtvRnSSNMS5Ty3lcs/oIu+FqhSfPWvBWp33lnnp3RHo0/lv6Ql34L1aBSskIhSs NImxztReKQRNESwWCFMDti3czF1t9a0V1QYuWcGY9fa02nugep9qfxYJtbEoZzYdiA3u C3vF4zJvKS9/8CjW2Kmbe/5li+ApGTJFHIo1BsTaL6iJ3kUSn+xdPcdX4vl4EW8aHJBy EfCGdVptf1IJ3wTg6b0UjGGkMZqtuzDoK4A6ytQapQRajFxcP+xEo5noaxI/f5oisWFT gWqw== MIME-Version: 1.0 X-Received: by 10.180.219.106 with SMTP id pn10mr27814155wic.56.1443544178937; Tue, 29 Sep 2015 09:29:38 -0700 (PDT) Received: by 10.27.104.197 with HTTP; Tue, 29 Sep 2015 09:29:38 -0700 (PDT) Received: by 10.27.104.197 with HTTP; Tue, 29 Sep 2015 09:29:38 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 Sep 2015 17:29:38 +0100 Message-ID: To: Joe Watkins Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11346a7000d4e10520e55279 Subject: Re: [PHP-DEV] Injecting structure to ZEND_NEW From: codekestrel@googlemail.com (Dominic Grostate) --001a11346a7000d4e10520e55279 Content-Type: text/plain; charset=UTF-8 Hi, ive already started working with the handlers. I've set up the parser to accept addition syntax before the ctor. The type arguments are passed to a new opcode handler which triggers prior to NEW but after FETCH_CLASS (if dynamic, after resolve on CONST). This needs to override the fetching of the class during the current NEW handler, but to do that I need to supply addition data. Do you know what I mean? I'm sorry if I'm explaining it badly. On 29 Sep 2015 4:58 pm, "Joe Watkins" wrote: > lxr: zend_set_user_opcode_handler > > On Tue, Sep 29, 2015 at 4:57 PM, Joe Watkins > wrote: > >> I think you are looking for opcode handlers, what you want to do is >> implement a ZEND_NEW handler ... >> >> For reference, xdebug and uopz overload handlers, as well as many other >> extensions ... >> >> Cheers >> Joe >> >> On Tue, Sep 29, 2015 at 3:47 PM, Dominic Grostate < >> codekestrel@googlemail.com> wrote: >> >>> I'm trying to pass a new structure into the ZEND_NEW handler which will >>> be >>> used to change the behaviour of zend_fetch_class_by_name. >>> >>> The issue I'm having though is the operands won't support the new type >>> unless I compile it to zval, but I can't use zend_execute_data to >>> reference >>> that in a pre-handler since that appears to deal exclusively with >>> function >>> calls. >>> >>> op2 is taken on ZEND_NEW for the ctor skip, which is why I can't pass a >>> new >>> zval directly to it. Is there another means I can pass the structure in? >>> >>> Dominic >>> >> >> > --001a11346a7000d4e10520e55279--