appu
appu

Reputation: 97

Simple PHP Query

Does the following condition checks value at one of array's memory location identified by key $propertyName or does it check if a key name is equal to $value?

      if($this->_properties[$propertyName] !=$value ...

Upvotes: 0

Views: 73

Answers (3)

AbdullahC
AbdullahC

Reputation: 6730

It checks if the value in the map $this->_properties that corresponds to the key name $propertyName is not equal to $value.

Upvotes: 0

Oliver Charlesworth
Oliver Charlesworth

Reputation: 272657

It checks whether $this->_properties[$propertyName] is not equal to $value. Specifically, it uses $propertyName to perform a key lookup in the associative array $this->_properties and extract its value, and then compares that to $value.

Upvotes: 1

user142019
user142019

Reputation:

It checks the value. It's not an array in this case, but a hashtable.

Upvotes: 0

Related Questions