ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
Re: [PHP-DEV] allow_call_time_pass_reference
by Hector Santos other posts by this author
May 8 2008 3:38PM messages near this date
[PHP-DEV] allow_call_time_pass_reference | Re: [PHP-DEV] allow_call_time_pass_reference
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


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Steph Fox
Hector Santos
Steph Fox
Steph Fox
Hector Santos
Hannes Magnusson
Todd Ruth
Hannes Magnusson
Todd Ruth
Steph Fox
Steph Fox
Stanislav Malyshev

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved