Hello,
Does anyone know what are the official names for the "->" and "=>"
operators? They don't seem to be included in the PHP documentation,
although I would have expected them to reside in the Operators section of
the manual.
Also, the "" operator used for declaring sub-namespaces is never mentioned
as a proper operator in the PHP manual, let alone have a specific name.
Thank you,
Adrian
Hello,
Hello Adi,
Does anyone know what are the official names for the "->" and "=>"
operators? They don't seem to be included in the PHP documentation,
although I would have expected them to reside in the Operators section of
the manual.Also, the "" operator used for declaring sub-namespaces is never mentioned
as a proper operator in the PHP manual, let alone have a specific name.
You should take a look at http://php.net/tokens.
Best regards.
--
Ivan Enderlin
Developer of Hoa
http://hoa.42/ or http://hoa-project.net/
PhD. student at LIFC/DISC (Vesontio) and INRIA (Cassis)
http://lifc.univ-fcomte.fr/ and http://www.inria.fr/
Member of HTML and WebApps Working Group of W3C
http://w3.org/
Adi Nita wrote:
Does anyone know what are the official names for the "->" and "=>"
operators? They don't seem to be included in the PHP documentation,
although I would have expected them to reside in the Operators section of
the manual.
The tokens are T_OBJECT_OPERATOR
and T_DOUBLE_ARROW
respectively, if
that helps: http://www.php.net/manual/en/tokens.php
The namespace operator is T_NS_SEPARATOR.
Hope that helps,
Ryan McCue
<http://ryanmccue.info/
Hi!
Does anyone know what are the official names for the "->" and "=>"
operators? They don't seem to be included in the PHP documentation,
although I would have expected them to reside in the Operators section of
the manual.
=> is not exactly operator, it's part of the array operator syntax (e.g.
array($foo => $bar) produces array from two vars, => by itself is not
used). -> is usually called an arrow operator.
Also, the "" operator used for declaring sub-namespaces is never mentioned
as a proper operator in the PHP manual, let alone have a specific name.
\ is not an operator either, it's a namespace separator.
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227