What php version allows this?
$var = a_function_that_returns_a_object()->property->something;
in old PHP versions you had to do this:
$obj = a_function_that_returns_a_object();
$var = $obj->property->something;
So from which PHP version does the first code work, without giving me a error ? I know that in 5.3 works bec开发者_StackOverflow社区ause I'm using it, but I want to know in what version it starts to break
Starting with PHP 5, method chaining is supported.
精彩评论