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