Re: [PHP-DEV] Array access on function returns

2008-04-20 Thread Wietse Venema
Kalle Sommer Nielsen: > Hey Internals > > I've been wondering for quite some time why PHP doesn't allow you > to access arrays when you assign it to a value like in Javascript: In many languages you get such functionality for free, because their parsers are written to accept: expression '['

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-20 Thread Christian Schneider
Markus Fischer schrieb: $foo->bar( (int)$baz, (string)$sober, (bool)$result['column_checkbox'] ); but this means he is really forced to think what he is really passing. I'm surprised that you find this desirable. It will not raise the overall code quality in a major way, but it helps develop

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-20 Thread Stanislav Malyshev
Hi! I may be missing something but in this context, "string" doesn't get very useful (I think), because besides arrays / objects (except Yes, it's not very useful, I agree. However, if you define "useful" as "being able to reject arguments that can be converted to strings but aren't marked