Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37556 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33084 invoked from network); 8 May 2008 22:38:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2008 22:38:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=hsantos@isdg.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hsantos@isdg.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain isdg.net designates 208.247.131.9 as permitted sender) X-PHP-List-Original-Sender: hsantos@isdg.net X-Host-Fingerprint: 208.247.131.9 ntbbs.winserver.com Windows NT 4.0 (older) Received: from [208.247.131.9] ([208.247.131.9:3563] helo=winserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/F0-27374-6C083284 for ; Thu, 08 May 2008 18:37:59 -0400 Received: from mail.winserver.com ([208.247.131.9]) by winserver.com (Wildcat! SMTP Router v6.3.452.5) for internals@lists.php.net; Thu, 08 May 2008 18:36:42 -0400 Received: from mail.winserver.com ([208.247.131.9]) by winserver.com (Wildcat! SMTP v6.3.452.5) with ESMTP id 727548078; Thu, 08 May 2008 18:36:41 -0400 Message-ID: <48238095.9060406@isdg.net> Date: Thu, 08 May 2008 18:37:09 -0400 Organization: Santronics Software, Inc. User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 CC: internals References: <021601c8b141$bbf64a50$4001a8c0@foxbox> In-Reply-To: <021601c8b141$bbf64a50$4001a8c0@foxbox> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Comment: Missing recipient address appended by wcSMTP router. To: internals@lists.php.net Subject: Re: [PHP-DEV] allow_call_time_pass_reference From: hsantos@isdg.net (Hector Santos) Steph Fox wrote: > Hi all, > > Does anyone have a good reason for keeping it switched on by default in > PHP 5.3? Like, would switching it off by default break a lot of existing > code, given that most users are a bit beyond PHP 3 now? As a new PHP extension author, it was one the first things I had to make sure was enabled to avoid the warning. The extension has over 150 server API functions exposed and a majority have a C/C++ prototype of: BOOL func(input, output); So our C/C++ to converter make them pass back structures as arrays, for example: boolean wcLookupName(string name, TUserInfo &uinfo); But because of this issue, we are slowing making functions return results as array: TUserInfo wcLookupName(string name); In many cases, it makes sense to have both, but I also think the former allows for easier programming: if (!wcLookup("hector", &$uinfo)) { die("error"); } as opposed to: if (($uinfo = wcLookup("hector") === null) { die("error"); } Six in one.... May I suggest to make it [Extension] INI ready? I explored this and it seem to work, but not sure if its really the case. It appears that adding it in my PHP.INI [extension_name] section appears to enabled the option only when the extension is loaded. -- Hector