Skip to content

Conversation

@iam-TJ
Copy link

@iam-TJ iam-TJ commented Oct 25, 2011

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 18 uses "isset($_GET['tile']) && $_GET['tile']" to check the presence of the $_GET value while this line uses another approach. Should we make it consistent by using one way through? The same comment applies to line 36, 41.

BTW, I personally likes the line 18 way better. :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference is that isset() will return false for array keys that have their value set to NULL whereas array_key_exists() only checks that the key exists.

That said, I'm struggling to recall the reason I used these styles of code. I think it was because I believed or saw that some of the GET variables may be NULL e.g. "/home/prog.php" rather than "/home/prog.php?done"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants