Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88557 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3231 invoked from network); 29 Sep 2015 15:58:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2015 15:58:05 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.160.180 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.160.180 mail-yk0-f180.google.com Received: from [209.85.160.180] ([209.85.160.180:34090] helo=mail-yk0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/93-20099-C05BA065 for ; Tue, 29 Sep 2015 11:58:05 -0400 Received: by ykdg206 with SMTP id g206so11293176ykd.1 for ; Tue, 29 Sep 2015 08:58:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=y2pDH+x94oc44DY2lolirATxA4uUTOwN6U4DqsbRtwo=; b=Ut1YIRna9m/QLB2QYXhDarrFfz+j+PlX8xQCWoUAJiJCdrVu/2hWxWCovXujeOvYsZ /S+rxnJywmY0P0vAr0VgHpLlnTl7SN/BAMysFKOJFct49DwaAEkUL9A9nQfa5sBST/8k Z3Ax4lX7oBjnr2dhiBadyCCdBNk5WK0FORisIqFSbneDUbMW1CmOVh4QqZwh5XjD7s0o acR4eMufc1XifdmD/fa8r46lrBOIZy4X1UidjqXQ9XHBnJcBBOttKXK5jxdnSkOS2nhg igh+dvWvCgj0vvC5+E/3yVdhIE5Qi+UB5NFfAm0D93RkUbJsu6KJmfIt5RNtM41sCGm9 fQdQ== X-Gm-Message-State: ALoCoQmWmoAUH3hQBfgi7mZAxZajj76i/Adp153SmVh5Cqe3KFzNqrFaq+wSqPaUn5mEy5CGxFDw MIME-Version: 1.0 X-Received: by 10.13.212.5 with SMTP id w5mr4673335ywd.97.1443542281644; Tue, 29 Sep 2015 08:58:01 -0700 (PDT) Received: by 10.129.111.197 with HTTP; Tue, 29 Sep 2015 08:58:01 -0700 (PDT) X-Originating-IP: [165.120.223.197] In-Reply-To: References: Date: Tue, 29 Sep 2015 16:58:01 +0100 Message-ID: To: Dominic Grostate Cc: PHP internals Content-Type: multipart/alternative; boundary=001a114fb502ea9f240520e4e0a5 Subject: Re: [PHP-DEV] Injecting structure to ZEND_NEW From: pthreads@pthreads.org (Joe Watkins) --001a114fb502ea9f240520e4e0a5 Content-Type: text/plain; charset=UTF-8 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 >> > > --001a114fb502ea9f240520e4e0a5--