note 28383 deleted from language.operators by sniper

From: Date: Mon, 13 Oct 2003 00:04:23 +0000
Subject: note 28383 deleted from language.operators by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58363@lists.php.net to get a copy of this message
Note Submitter: jlsalinas@gmx.SPAMSUCKS.net ---- About Rick's comment on 16-Nov-2002: => cannot be an operator, for it would be impossible to specify keys when building arrays. Supposing that => is an operator, bluiding $arr this way: $arr = array ('key1' => 'value1', 'key2' => 'value2'); would be exactly the same as: $arr = array(); $arr[] = 'key1' => 'value1'; $arr[] = 'key2' => 'value2'; and print_r($arr) would yield something like: array ( [0] => whatever ['key1' => 'value1'] yields, [1] => whatever ['key2' => 'value2'] yields, ); That's because being => an operator, "op1 => op2" is an expression and therefore it yields a value.

« previous php.notes (#58363) next »