Hanzo Kimura
Hanzo Kimura

Reputation: 101

What is this symbol called =>

What is this => symbol Called in PHP. I know it can be interpret as Equal Sign Right Angle Bracket. | can be called Pipe or OR. but my prof was asking the other term to call the => symbol. It is for assigning a value to a key in array class. does anyone know what this is called?

Upvotes: 5

Views: 2485

Answers (4)

Keval Domadia
Keval Domadia

Reputation: 4763

It is an assignment operator There are no official names but, if you come across any PHP Error referring to non-associative key then, PHP error calls it T_DOUBLE_ARROW

Upvotes: 2

uzyn
uzyn

Reputation: 6693

It's officially being called T_DOUBLE_ARROW.

Reference: http://php.net/manual/en/tokens.php

Upvotes: 6

linsek
linsek

Reputation: 3480

It is an assignment operator. Right associativity.

Upvotes: 1

Noufal Ibrahim
Noufal Ibrahim

Reputation: 72855

I've often heard it referred to (atleast in the perl world) as a "double barrelled arrow".

Upvotes: 0

Related Questions