When I use the following code:
I get an parse error:
Off course the code itself doesn't do anything and will result in runtime-errors. But I wonder why I get this parse-error
It parses correctly using PHP5, so it probably has something to do with the way the -> operator works in earlier versions of PHP. Does anybody can tell me more?
| Code: |
|
<?php $o = New Object(); $res = $o->some_method(0)->prop; ?> |
I get an parse error:
| Quote: |
|
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /file.php on line 5 |
Off course the code itself doesn't do anything and will result in runtime-errors. But I wonder why I get this parse-error
It parses correctly using PHP5, so it probably has something to do with the way the -> operator works in earlier versions of PHP. Does anybody can tell me more?
