Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23286 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6085 invoked by uid 1010); 11 May 2006 22:56:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6070 invoked from network); 11 May 2006 22:56:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2006 22:56:09 -0000 X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:63639] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 08/C4-19568-801C3644 for ; Thu, 11 May 2006 18:56:09 -0400 Received: (qmail 24499 invoked from network); 11 May 2006 22:55:59 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 11 May 2006 22:55:59 -0000 Message-ID: <4463C105.8080007@zend.com> Date: Fri, 12 May 2006 02:56:05 +0400 User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 To: "D. Dante Lorenso" CC: PHPdev References: <4463BF89.9040906@vocalspace.com> In-Reply-To: <4463BF89.9040906@vocalspace.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] allow extension writers to ignore E_NOTICE warnings about unset variables From: antony@zend.com (Antony Dovgal) On 12.05.2006 02:49, D. Dante Lorenso wrote: > All, > > Is there a way to define a function in an extension which would not > require a passed in variable to exist? In other words, can ZE be > modified to allow extensions to not trigger E_NOTICE warnings if an > unset variable is passed to a function which does not care if the var is > set? > > I can specify preferences about whether variables are passed by > reference or not using macros like: > > * PHP_FE(..., first_arg_force_ref) > * PHP_FE(..., third_arg_force_by_ref_rest) > * PHP_FE(..., first_through_third_args_force_ref) > > Which probably boil down somewhere into: > > * #define ZEND_SEND_BY_VAL 0 > * #define ZEND_SEND_BY_REF 1 This one is what you need. -- Wbr, Antony Dovgal