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

2005-10-30 Thread Ron Korving
I'm a big fan of coalesce($param1, $param2, ..., $paramN) (or firstset()). The syntax allows for more than what ifsetor($var, $value) would do. Ifsetor() could be done in userspace, but I don't see how coalesce() could, because of the variable number of parameters. Ron Sean Coates [EMAIL

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

2005-10-30 Thread Marian Kostadinov
Whatever the name is, I think the most important thing should be that second argument is not evaluated if the first one is set. And about the name - $a = $b ?? $c looks good. $a ??= $c is fine too because it is close to $a = $b || $c and $a ||= $c.. On 30/10/05, Ron Korving [EMAIL PROTECTED]

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

2005-10-30 Thread Marcus Boerger
Hello Ron, damn it! ifsetor or any equivalent cannot be done in userspace. If you don't get don't write here. marcus Sunday, October 30, 2005, 9:52:47 AM, you wrote: I'm a big fan of coalesce($param1, $param2, ..., $paramN) (or firstset()). The syntax allows for more than what

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

2005-10-30 Thread Ron Korving
Marcus, my point was that this simple function: function ifsetor($var, $value) { return (isset($var)) ? $var : $value; } can be done in userspace, and that a coalesce() like function will have the added benefit of a variable number of parameters, which as far as I know, cannot be done

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

2005-10-30 Thread Sara Golemon
function ifsetor($var, $value) { return (isset($var)) ? $var : $value; } can be done in userspace. Perhaps, but it won't do what you think, and certainly won't do what this thread has been discussing for over half a year. -- PHP Internals - PHP Runtime Development Mailing List To

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

2005-10-30 Thread Sven Fuchs
Hi Marcus, ifsetor or any equivalent cannot be done in userspace. i agree here. Last time this topic has been discussed I've naively asked for opinions regarding a userland implementation. Afterwards the discussion suddenly ended. In the meantime I've tried to use it more often but found

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

2005-10-30 Thread Jasper Bryant-Greene
On Sun, 2005-10-30 at 09:52 +0100, Ron Korving wrote: I'm a big fan of coalesce($param1, $param2, ..., $paramN) (or firstset()). The syntax allows for more than what ifsetor($var, $value) would do. Ifsetor() could be done in userspace, but I don't see how coalesce() could, because of the

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

2005-10-30 Thread Jani Taskinen
On Sat, 29 Oct 2005, Sara Golemon wrote: How about ||| and |||= ? How about a good ol' beating with a large trout? :) --Jani -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2005-10-30 Thread Ron Korving
The function I used in my post does not generate an E_NOTICE, because a call-by-reference can be done with an unset variable (that can be set from the function). ?php error_reporting(E_ALL); function ifsetor($var, $value) { return (isset($var)) ? $var : $value; } echo

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

2005-10-30 Thread Robert Cummings
On Sun, 2005-10-30 at 15:57, Ron Korving wrote: The function I used in my post does not generate an E_NOTICE, because a call-by-reference can be done with an unset variable (that can be set from the function). ?php error_reporting(E_ALL); function ifsetor($var, $value) {