|
The -> and . operators
Development
|
|
|||
|
|
I made the -> operator an alias of the . operator in SVN. It dawned on me that there was absolutely no compelling reason to have two separate operators for two separate types of objects when both did, essentially, the same thing. In particular, you can not access object member variables using . as well as []. e.g., $obj.name or $obj['name']. Likewise, you can access arrays using -> if you so wish, e.g. $array->2. I do not plan on removing the -> operator, though it's a possibility. I imagine a lot of PHP and Smarty programmers would get way too confused if -> wasn't available, and leaving it in has very little impact on the parser code. If you update your SVN, you may need to clear all your cache files. Anyone who upgrades directly to 0.74 when it's released will not need to do this, however, as once the version number is changed the cache will automatically invalidate. |
||
|
|||
|
|
Hmm, that should say "In particular, you can now access object member variables." Guess I need to add preview and editing features to the forums soon. ![]() |
||