# Change to function call semantics in PHP 5.1?

- Thread: https://externals.io/message/21974
- Original archive: https://news-web.php.net/php.internals/21974
- Started by Mark Spruiell on 2006-02-21T22:05:20+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #21974 — Mark Spruiell — 2006-02-21T22:05:20+00:00

URL: https://externals.io/message/21974#21974

In PHP 5.0.x, I can chain function calls like this:

$obj->method()->anotherMethod();

In PHP 5.1.x, this code results in an error:

parse error, unexpected `T_OBJECT_OPERATOR` in ...

I've looked through the change log for 5.1 but didn't see
anything relevant.

Was this an intentional change?

Thanks,
- Mark

---

## #21985 — Derick Rethans — 2006-02-22T08:19:57+00:00

URL: https://externals.io/message/21974#21985 · In reply to: #21974

> In PHP 5.0.x, I can chain function calls like this:
> 
> $obj->method()->anotherMethod();
> 
> In PHP 5.1.x, this code results in an error:
> 
> parse error, unexpected `T_OBJECT_OPERATOR` in ...
> 
> I've looked through the change log for 5.1 but didn't see
> anything relevant.
> 
> Was this an intentional change?

Uh, this works fine in tons of our code...

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
