[PHP-DEV] CVS Account Request: roast

2005-10-29 Thread ZhangLibing
Hello Sir,I am a PHP Programer at china.I require a CVS account to go shares my DLL which designed by Microsoft Visual C++;Those DLL can be used to extend PHP for corporation applications. Thanks! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] 1.5Gb PHP process, lots of swap

2005-10-29 Thread Sebastian
Something like the variables produced by perl's my() operator so that a variable is lexically scoped along with block-level scoping could help earlier detection of when it's possible to release a variable. This wouldn't solve leaks, but it might help prevent some On 10/28/05, Andi Gutmans [EMAIL

[PHP-DEV] [PATCH] array_product()

2005-10-29 Thread Arpad Ray
The array_product() function is completely broken. I've filed a bug at http://bugs.php.net/bug.php?id=35014 describing the problem, but to summarise it returns 0 for all valid input and when the input is an empty array. I've also posted a patch, which fixes everything for me. I would appreciate

RE: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Bob Silva
I believe I have it working. Anyone see any blatant problems with this? Also, would it make sense to have this functionality in the engine itself? Seeing as that internal classes have inheritance capabilities, it seems logical to have the functionality to call a parent constructor within the

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c php-src NEWS

2005-10-29 Thread Sebastian Bergmann
Jani Taskinen schrieb: If you're going to add it in PHP_5_1 branch, why are you adding the thing in HEAD NEWS file? Because for now it is in HEAD only. Once PHP 5.1.0 has been released and the PHP_5_1 branch is open for this kind of check-in, I will MFH the patch from HEAD and move the NEWS

Re: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Marcus Boerger
Hello Bob, why so complex and potential wrong? zend_class_entry *ce = Z_OBJ_CE(object); zend_function*ctor = ce-parent ? ce-parent-constructor : NULL; if (ctor ctor-common.fn_flags ZEND_ACC_PUBLIC) { zend_call_method_with_0_params(object, ce, ctor, __construct, NULL); } btw, why

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c php-src NEWS

2005-10-29 Thread Marcus Boerger
Hello Sebastian, what do you think comes out first, 5.1.1 or 6.0 ? marcus Saturday, October 29, 2005, 12:36:04 PM, you wrote: Jani Taskinen schrieb: If you're going to add it in PHP_5_1 branch, why are you adding the thing in HEAD NEWS file? Because for now it is in HEAD only. Once PHP

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_builtin_functions.c php-src NEWS

2005-10-29 Thread Sebastian Bergmann
Marcus Boerger schrieb: what do you think comes out first, 5.1.1 or 6.0 ? PHP 5.1.1, of course. But as I cannot yet commit to PHP_5_1 I did not want to have the patch in HEAD without a NEWS entry. -- Sebastian Bergmann http://www.sebastian-bergmann.de/ GnuPG Key:

Re: [PHP-DEV] Re: PHP 5.1.0RC4 Released

2005-10-29 Thread Marcus Boerger
Hello Greg, pear install looks much better now and i could finally get my rpm'w working again. Right now there is only a warning that keeps the current state from being perfect: Installing PEAR environment: /var/tmp/php5-5.1.0.dev-buildroot/usr/lib/php/pear/ --13:02:14--

RE: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Bob Silva
Why so complex? Because I have no clue what I am doing, but why let a little thing like that stop me. Thanks for the suggestion, I had to modify it a bit to properly climb the constructor chain though. You cant grab the ce of the active object since it may have multiple parents up the chain. The

Re: [PHP-DEV] Follow the object constructor chain ... options

2005-10-29 Thread Marcus Boerger
Hello Bob, we are btw thinking of having a way to enfore calling parent ctor. anyway that looks like you're heading towards some autoboxing feature. Even though it is not necessary aas in java it may gives you the ability to type check with base types as well and given the assumption you

Re: [PHP-DEV] 1.5Gb PHP process, lots of swap

2005-10-29 Thread Andi Gutmans
Well in most cases, if your program isn't written in the global scope but has methods or functions, then local variables will be removed early enough. For situations where you need to force it I suggest to use unset(). It'd be ugly to add another scoping operator and in most cases it's not

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread James Crumpton
A good point certainly... I suppose it could continue to follow the current form, evaluating $c as false and return int(1) instead of bool(true). Though that would probably diminish it's utility for 'if set or'. And there would be a BC break for those doing: $a = $b || $c; if ($a === true) {

[PHP-DEV] Bug in SOAP extension... Re-Keying arrays?

2005-10-29 Thread Mike Benoit
I searched bugs.php.net but couldn't find anything relating to this issue. Unfortunately I am unable to test with versions newer than PHP 5.0.4 right now, so forgive me if this has already been addressed. It seems that if the SOAP extension can cast the first key of an array to an INT, it re-keys

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread James Crumpton
A good point certainly... I suppose it could continue to follow the current form, evaluating $c as false and return int(1) instead of bool(true). Though that would probably diminish it's utility for 'if set or'. And there would be a BC break for those doing: $a = $b || $c; if ($a === true) { }

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Matthew C. Kavanagh
However, in terms of precedents, there are the combined assignment operators such as =, +=, .=, and so on. They would suggest that $a ||= $b; should be equivalent to $a = $a || $b; So I don't think ||= in the suggested usage is intuitive. And adding strange automagical meanings to $a = $a ||

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Sara Golemon
Evaluating an idea based on it's syntactic similarities to other languages is complete and utter nonsense. It has nothing to with being like language Xyz. It has to do with familiarity to language constructs. One already understands the idea of 'this || that'. It's certainly I'll throw the

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Jasper Bryant-Greene
On Sat, 2005-10-29 at 14:07 -0700, Sara Golemon wrote: Evaluating an idea based on it's syntactic similarities to other languages is complete and utter nonsense. It has nothing to with being like language Xyz. It has to do with familiarity to language constructs. One already understands

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Marcus Boerger
Hello Jasper, Saturday, October 29, 2005, 11:34:52 PM, you wrote: On Sat, 2005-10-29 at 14:07 -0700, Sara Golemon wrote: Evaluating an idea based on it's syntactic similarities to other languages is complete and utter nonsense. It has nothing to with being like language Xyz. It has to do

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Greg Beaver
Sara Golemon wrote: Evaluating an idea based on it's syntactic similarities to other languages is complete and utter nonsense. It has nothing to with being like language Xyz. It has to do with familiarity to language constructs. One already understands the idea of 'this || that'. It's

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Sebastian
I still think // and //= would be the most reasonable. They involve the least amount of syntax and // looks similar to || On 10/29/05, Greg Beaver [EMAIL PROTECTED] wrote: Sara Golemon wrote: Evaluating an idea based on it's syntactic similarities to other languages is complete and utter

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Rasmus Lerdorf
Sebastian wrote: I still think // and //= would be the most reasonable. They involve the least amount of syntax and // looks similar to || // is a comment. Why don't you guys at least take a peek at the grammar before suggesting stuff. -Rasmus -- PHP Internals - PHP Runtime Development

RE: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread David Zülke
You are joking, aren't you? - David -Original Message- From: Sebastian [mailto:[EMAIL PROTECTED] Sent: Sunday, October 30, 2005 12:43 AM To: Greg Beaver Cc: internals@lists.php.net Subject: Re: [PHP-DEV] what happened to that new isset() like language I still think // and //=

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Sebastian
whoops, forgot about comments. On 10/29/05, David Zülke [EMAIL PROTECTED] wrote: You are joking, aren't you? - David -Original Message- From: Sebastian [mailto:[EMAIL PROTECTED] Sent: Sunday, October 30, 2005 12:43 AM To: Greg Beaver Cc: internals@lists.php.net Subject:

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Nico Edtinger
Hi! If you want something similar why not something that's similar to the currently used $x = isset($x) ? $x :'x';. I don't think PHP has something that can be written as ?? currently and it would be similar to the current expression: $x = $x ?? 'x'; or $x ??= 'x'; Or if it should be a

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Sebastian
Given that // is not acceptable, as others sarcastically reminded me, and that this introduces new sytax, I think it might be best just to add more functions. I don't think something like $d = first-existing: $a, $b, $c; is any better than first_existing($a, $b, $c), and the former happens at

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Arpad Ray
For the assign-if-not-set operator, I like the idea of: $foo ?= 'bar'; ? implies a condition, and the = immediately following will raise a parse error in older versions. There's admittedly potential for confusion with the ternary operator, but since that's most commonly used for conditional

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Sebastian
But what about the use of ? as an infix operator? that wouldn't work out so well because of the ternary ?: On 10/29/05, Arpad Ray [EMAIL PROTECTED] wrote: For the assign-if-not-set operator, I like the idea of: $foo ?= 'bar'; ? implies a condition, and the = immediately following will raise

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Greg Beaver
Sebastian wrote: Given that // is not acceptable, as others sarcastically reminded me, and that this introduces new sytax, I think it might be best just to add more functions. I don't think something like $d = first-existing: $a, $b, $c; is any better than first_existing($a, $b, $c),

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Arpad Ray
Sebastian wrote: But what about the use of ? as an infix operator? that wouldn't work out so well because of the ternary ?: Right, which is why I didn't suggest that. I think Greg's idea of first-existing: is an interesting one (and by the sound of it the most robust). Personally I'd like

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Marcus Boerger
Hello Edin, on the other hand it is not doablenot without a major slowdown. Thus the idea of ifsetor($var, expression). Why the hell do we need to discuss this over and over again? The only way is this version. Be it with some cryptic operator like '?:' or some function name like 'ifsetor'.

RE: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Bob Silva
It should be a function and not a language construct IMHO. Either ifsetor or overload the isset statement (which may not be possible within the engine). If isset called with 1 argument, it returns a boolean, otherwise it returns the first valid variable. Instead of: $localvar =

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Arpad Ray
Bob Silva wrote: This makes perfect sense (to me at least): $localvar = isset($_REQUEST['globalvar'], default value 1, ...); The obvious problem there being that isset() currently takes multiple variables as arguments and checks that they're all set. From the manual: bool isset ( mixed var

Re: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Sean Coates
Bob Silva wrote: It should be a function and not a language construct IMHO. Either ifsetor or overload the isset statement (which may not be possible within the engine). It _has_ to be a language construct, and not a function (otherwise, we'd get a notice when first using the variable). It

RE: [PHP-DEV] what happened to that new isset() like language

2005-10-29 Thread Bob Silva
Whoops, geez, you use a language for 8 years and you'd think you know what it can do! Beyond that ifset is a nicer name than ifsetor, people can RTFM (like I obviously should have done) to figure out the functionality. -Original Message- From: Arpad Ray [mailto:[EMAIL PROTECTED] Sent: