Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88556 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2904 invoked from network); 29 Sep 2015 15:57:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2015 15:57:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.160.171 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.160.171 mail-yk0-f171.google.com Received: from [209.85.160.171] ([209.85.160.171:35579] helo=mail-yk0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/83-20099-105BA065 for ; Tue, 29 Sep 2015 11:57:53 -0400 Received: by ykdz138 with SMTP id z138so11260508ykd.2 for ; Tue, 29 Sep 2015 08:57:49 -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=JGY12qb/VUI9jv7P1iiE1X+mAxUnScGx3QcIg04jbNo=; b=KImX4uz7bWD54DZCYhj8DqM2O/7RhWX1wpM7HFI3BhMDgJz33N+deJFNRBekCoN/wH ZdAO0LhCKZfQRb7/CAq1fVbjxhmh1m5DUEuqi86Ju5zXwan5LBan3AHVP6XcVpcJc5ut oeh2B1fzBv98TpUWQOzT4/d1aHvwK+JvctAbtdjSwbbX3zu7EuRED673adMwr09io9Xr 4Pg1fS0CRV86zJGxus8oiDzkFxGH8oR+KDtxRAcetWCHeBB62up9fJ8lrfdZDl951qxk UVQBRgFugFjL6FpMIfBWRROiECebNtNRXWNyvwlToJrDxHPBrBXOnERx+BF/3nFQa9vz F8Gg== X-Gm-Message-State: ALoCoQkasIAFwtVJ3/DRHffHTnMCgbF3Vy4sM2c35/WQCshxq4lCzgSJeH3HO701g/f1wFZR9Awa MIME-Version: 1.0 X-Received: by 10.129.74.138 with SMTP id x132mr21499355ywa.112.1443542269203; Tue, 29 Sep 2015 08:57:49 -0700 (PDT) Received: by 10.129.111.197 with HTTP; Tue, 29 Sep 2015 08:57:49 -0700 (PDT) X-Originating-IP: [165.120.223.197] In-Reply-To: References: Date: Tue, 29 Sep 2015 16:57:49 +0100 Message-ID: To: Dominic Grostate Cc: PHP internals Content-Type: multipart/alternative; boundary=001a114d8f482d0f0e0520e4e0f4 Subject: Re: [PHP-DEV] Injecting structure to ZEND_NEW From: pthreads@pthreads.org (Joe Watkins) --001a114d8f482d0f0e0520e4e0f4 Content-Type: text/plain; charset=UTF-8 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 > --001a114d8f482d0f0e0520e4e0f4--