Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-04 Thread D. Dante Lorenso
Rasmus Lerdorf wrote: D. Dante Lorenso wrote: In my PHP zen world, empty() and filled() are friends. Ok, I've been selling 'filled()' for a while now. Can we reverse the sell and try this .. why SHOULDN'T filled() be added to the language? Because it doesn't do enough. Unlike empty(), when

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-04 Thread Pierre
On Thu, 04 May 2006 14:27:09 -0500 [EMAIL PROTECTED] (D. Dante Lorenso) wrote: Detracting from my goal of having 'filled()' included in core, I'd have to say that as I see input filtering defined, that could be entirely written as part of Zend Framework in PHP and doesn't need to exist as

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-04 Thread Jared White
On May 4, 2006, at 2:06 PM, Pierre wrote: On Thu, 04 May 2006 14:27:09 -0500 [EMAIL PROTECTED] (D. Dante Lorenso) wrote: Detracting from my goal of having 'filled()' included in core, I'd have to say that as I see input filtering defined, that could be entirely written as part of Zend

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-04 Thread Brian Moon
Well, from where I'm setting, Dante has brought up excellent points that were never covered before according to my look at the list archives. In fact, I find this situation indicative of a larger problem, which is that extremely important discussions of major issues with the language get

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-04 Thread Pierre
Jared, Brain, On 5/5/06, Brian Moon [EMAIL PROTECTED] wrote: Dante's discussion has nothing to do with ifsetor() or the filter extension IMO. His last answer has obviously something to do with both. My answer answer is to his last post, which has obviously something to do with that. My

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread D. Dante Lorenso
D. Dante Lorenso wrote: I don't think something like this can NOT be written in userspace because the 'isset' and 'empty' checks need to be run before arguments can be passed to a user function or warnings will start flying. A function like this simplifies code which used to look like this:

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Johannes Schlueter
Hi, please search the archives for ifsetor. johannes On Wednesday 03 May 2006 07:56, D. Dante Lorenso wrote: All, I'm sure this has been asked somewhere, but since I see requests for features for 5.2 or 6.0, I'd like to add a simple item to the list which would be quite useful to me and

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Steph Fox
D. Please read the mailing list archives. And don't mention it again ;) - Steph - Original Message - From: D. Dante Lorenso [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: internals@lists.php.net Sent: Wednesday, May 03, 2006 8:05 AM Subject: Re: [PHP-DEV] Seeking 'coalesce' php

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread D. Dante Lorenso
Johannes Schlueter wrote: please search the archives for ifsetor. I have completed this search and find: http://marc.theaimsgroup.com/?r=1w=2q=bl=php-devs=coalesce http://marc.theaimsgroup.com/?l=php-devw=2r=1s=ifsetorq=b I am using PHP 5.1.2 currently and thought using

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Eric Coleman
http://us3.php.net/func_get_args http://us3.php.net/array Enjoy. Eric Coleman Eric Coleman http://aplosmedia.com home: 412 399 1024 cell: 412 779 5176 On May 3, 2006, at 3:13 AM, D. Dante Lorenso wrote: Johannes Schlueter wrote: please search the archives for ifsetor. I have

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread D. Dante Lorenso
Eric, This reply is too basic and is not the answer. The problem is more complex then you have grasped. The only way to remove the notice and warning errors is by using pass-by-reference in the userspace function. Pass-by-reference can not be done for literal values and will only work on

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Rick Widmer
D. Dante Lorenso wrote: Eric, This reply is too basic and is not the answer. The problem is more complex then you have grasped. function ifsetor() { $args = func_get_args(); $count = count( $args ); for( $i=0; $i$count; $i++ ) { if isset( $args[ $i ] )) { return $args[ $i ];

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread D. Dante Lorenso
Rick Widmer wrote: D. Dante Lorenso wrote: Eric, This reply is too basic and is not the answer. The problem is more complex then you have grasped. function ifsetor() { $args = func_get_args(); $count = count( $args ); for( $i=0; $i$count; $i++ ) { if isset( $args[ $i ] )) { return

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Rick Widmer
D. Dante Lorenso wrote: No, that doesn't address the problem. See this: print @ifsetor($x, $y, $z, dante).\n; -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Jochem Maas
Rick Widmer wrote: D. Dante Lorenso wrote: No, that doesn't address the problem. See this: print @ifsetor($x, $y, $z, dante).\n; point 1: regardless of how people think there should be an ifsetor() in the engine - the devs don't so there wont be one. point 2: anything trying to

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread D. Dante Lorenso
Jochem Maas wrote: point 1: regardless of how people think there should be an ifsetor() in the engine - the devs don't so there wont be one. Avvhggghh! Don't you just want to scream! point 2: anything trying to implement this functionality in userspace is a hack. (to stregethen that

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Rasmus Lerdorf
Not sure what you guys are talking about. ?: is on the roadmap. -Rasmus D. Dante Lorenso wrote: Jochem Maas wrote: point 1: regardless of how people think there should be an ifsetor() in the engine - the devs don't so there wont be one. Avvhggghh! Don't you just want to scream! point

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread D. Dante Lorenso
Rasmus Lerdorf wrote: Not sure what you guys are talking about. ?: is on the roadmap. -Rasmus Ok. That has some signs of hope. What is ?: exactly, though. I searched '?:' and yeah, good luck with that in documentation. It doesn't smell like it supports all the specifics that 'filled()'

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Jasper Bryant-Greene
D. Dante Lorenso wrote: Rasmus Lerdorf wrote: Not sure what you guys are talking about. ?: is on the roadmap. -Rasmus Ok. That has some signs of hope. What is ?: exactly, though. Rasmus is referring to making the middle operand in the ternary operator optional, I believe. Jasper --

Re: [PHP-DEV] Seeking 'coalesce' php internal function

2006-05-03 Thread Rasmus Lerdorf
D. Dante Lorenso wrote: In my PHP zen world, empty() and filled() are friends. Ok, I've been selling 'filled()' for a while now. Can we reverse the sell and try this .. why SHOULDN'T filled() be added to the language? Because it doesn't do enough. Unlike empty(), when there actually is

[PHP-DEV] Seeking 'coalesce' php internal function

2006-05-02 Thread D. Dante Lorenso
All, I'm sure this has been asked somewhere, but since I see requests for features for 5.2 or 6.0, I'd like to add a simple item to the list which would be quite useful to me and would simplify and clean up a lot of code out there: function coalesce(...) This works much like in the SQL