Mark Spruiell skrev:
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.
[EMAIL PROTECTED]:~$ php -r 'class a { function b() { return new B; } } class
B { function C() { echo "Works fine."; } } $a = new A; $a->b()->c();'
Works fine.
[EMAIL PROTECTED]:~$ php -v
PHP 5.1.1 (cli) (built: Jan 7 2006 21:44:30)
The error is somewhere in your code.
/j
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php