note 71671 deleted from migration5.incompatible by bobby
| From: | bobby@php.net | Date: | Mon, 11 Dec 2006 21:52:48 +0000 |
| Subject: | note 71671 deleted from migration5.incompatible by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-120518@lists.php.net to get a copy of this message | ||
Note Submitter: someone
----
I don't seem to see this change documented anywhere:
In php4, if you used -> after a function call, it would give a parse error of unexpected
T_OBJECT_OPERATOR, while in php5 it is perfectly valid
<?php
//works in php5 but not php4
$obj->func1()->func2();
//works in both php4 and 5
$obj->var1->func1();
//a work around to the problem:
$thing = $obj->func1();
$thing->func2();
?>