Type casting and syntax "hacks" (eg: to call a closure assigned as a property) are very different and not comparable, IMO.
My personal preference would be: $foo = (int) $foo; and return ($this->callback)(); // or return call_user_func($this->callback); -- Woody Gilk http://about.me/shadowhand On Mon, Oct 23, 2017 at 9:23 AM, Rivera, John <[email protected]> wrote: > I’ve always used the first case. Consider another similar situation: > calling a callable that’s also a property of self. You’d have to call it > with parentheses — that is, ($callback)(); with no spaces. I feel like the > first case is more consistent when taking into account the rest of the > language. > > On Oct 23, 2017, at 7:45 AM, Woody Gilk <[email protected]> wrote: > > I've always used the second case. The first feels really cramped IMO. > > On Mon, Oct 23, 2017, 04:47 'Alexander Makarov' via PHP Framework > Interoperability Group <[email protected]> wrote: > >> Same here. Using 1st case. >> >> >> On Monday, October 23, 2017 at 12:28:17 PM UTC+3, Alessandro Lai wrote: >>> >>> This is an interesting topic. I've always found inconsistencies on this >>> topic, since some formatters use the first case, others the latter. >>> >>> I'm inclined for the first case, since it's normally applied just to the >>> symbol at the immediate right of it... >>> >>> Il giorno lunedì 23 ottobre 2017 08:56:35 UTC+2, Anton Okolelov ha >>> scritto: >>>> >>>> Hello >>>> >>>> Could you please add typecasting space issue in >>>> https://github.com/php-fig/fig-standards/blob/master/prop >>>> osed/extended-coding-style-guide.md ? >>>> >>>> $intValue = (int)$stringValue; >>>> >>>> or >>>> >>>> $intValue = (int) $stringValue; >>>> >>>> Thank you >>>> >>> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/php-fig/3b645b2e-1daa-42a5-8664-f4645d143346%40googlegroups.com >> <https://groups.google.com/d/msgid/php-fig/3b645b2e-1daa-42a5-8664-f4645d143346%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > > Woody Gilk > http://about.me/shadowhand > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ms > gid/php-fig/CAGOJM6LBCsQ4f3ufOxZGorS8WG2sDtu76S2LouwHJRMGy6_ > BsA%40mail.gmail.com > <https://groups.google.com/d/msgid/php-fig/CAGOJM6LBCsQ4f3ufOxZGorS8WG2sDtu76S2LouwHJRMGy6_BsA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ms > gid/php-fig/3144C773-6A79-4BE4-8962-D37523EB9E5D%40buffalo.edu > <https://groups.google.com/d/msgid/php-fig/3144C773-6A79-4BE4-8962-D37523EB9E5D%40buffalo.edu?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAGOJM6JNL0ae7F7E4K%3Dxc6VjKoewX-gKqgRFreTA3CwJcAYBTw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
