somefunction($foo, $bar, [
// ...
]);
somefunction($foo, $bar, [
// ...
], $ban);
array_map(function($foo) {
// ...
}, $bar);
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/8280f3e5-da43-4289-8e09-56c5b8f742c9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CA%2B3%3DdgHdoT2YjF-Y0zRoiUCDv6SteO3Hqe%3DrZQk7UvFX4kKy4w%40mail.gmail.com.
PLEASE ONLY REPLY WITH A, B OR C.I'll be available on IRC for most of the day if you would like to discuss. Otherwise, make a new thread or something.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/411c8101-34aa-4dfc-b295-9d337a8ff48d%40googlegroups.com.
Justin, I was thinking the same thing.Phil, this is a trick question, isn't it? :-b
--
Jeremy Lindblom
PHP Software Engineer at Amazon Web ServicesCo-author of the AWS SDK for PHPCo-organizer of the Seattle PHP User GroupKeys/Vocals for Gigawatt Band
On Tue, Sep 10, 2013 at 1:34 PM, justin <jus...@justinhileman.info> wrote:I'd be "2" *but* array_map, array_filter and friends have their arguments in the wrong order:Example C)array_map(function($foo) { // ... }, $bar);
… so that complicates things :(
array_map(function($foo) {
// ...
}, $bar);
Hi.
A question on what would be valid already. This?!
someFunction(
$foo,
$bar,
[
// … can even be a closure with more indentation
],
$ban
);
So why the need for another option? Even if we (TYPO3 Flow) are not following PSR-2, I'd vote 1) because there is already a valid way to express this.
PLEASE ONLY REPLY WITH A, B OR C.
Not necessarily; a valid version, to me, could also be this:
array_map(
function($foo) {
// ...
},
$bar
);
2
Thanks,
Michael C
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CANAnSg2-NQvccHYTeY1JgkERbEdPJvm5FEMzeOUq5wr%3Dh18q%2Bg%40mail.gmail.com.
On 13 September 2013 20:36, Paul M. Jones <pmjo...@gmail.com> wrote:Not necessarily; a valid version, to me, could also be this:
array_map(
function($foo) {
// ...
},
$bar
);This is much better than having a weird exception of $bar acceptable only as a the last arg.To me it isn't a weird exception of having a trailing $variable as the last arg. I consider an array [] or a function () { } to be one argument. If they happen to span multiple lines themselves, that does not change the fact that they are one argument and for all intents and purposes are "inline."Said another way:... an array or anonymous function argument may span multiple lines.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/3a9b6880-3da1-4eae-aaf5-b503a0ce8c54%40googlegroups.com.