What does coalesce() do?
If I'm guessing correctly, would  proposal #2 that Rune Kaagaard put up
solve that for you?
https://gist.github.com/909711

Rune's proposal #2, extending func_get_arg(), is impossible to
implement/would not work.

His proposal #3, which is more like coalesce(), suffers from the
drawbacks/problems of coalesce() which I discussed in a recent post
(though you can see Rune has some workarounds/hacks to deal with some of
the problems).

IMHO, his proposal #1 is the only real contender. However, I believe it
conflates two problems which others do not want conflated. He briefly
dismisses the [?] syntax, because it addresses what he sees as a
different problem. However, that different problem is really part of his
problem. My contention is that the two parts of his problem are better
solved independently (notice-suppression separately to finding an
isset/!empty value), and furthermore that one of the two versions of his
problem is already partially solved and should be reused, not reinvented
(existing ternary operator for a !empty check).

Ben.




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to