开发者

PHP syntax, what does '=>' mean other than array assignment? [duplicate]

This question already has answers here: 开发者_开发技巧 Closed 12 years ago.

Possible Duplicates:

What does “=>” mean in PHP?

Reference - What does this symbol mean in PHP?

Check this: var $hasAndBelongsToMany => array('Member' => 'User'); What does the sign => mean? the second one I know, but what is the first =>?

I saw it in the cakePhp manual.

Link add: http://book.cakephp.org/view/1039/Associations-Linking-Models-Together#


It looks like an mistake.
$var assignments are with a singe '=', that '>' shouldn't be there. It produces an parse error.


Honestly, it looks like a typo. I found the CakePHP manual and only find instances of $hasAndBelongsToMany = array(..., not => array.


PHP documentation doesn't know such operator in any other than array item assignment context.

So, it is a typo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜