Skip to content

Instantly share code, notes, and snippets.

View gerrywastaken's full-sized avatar
🔎
🔬 🕺 🔒 🌎 👾

Gerry gerrywastaken

🔎
🔬 🕺 🔒 🌎 👾
View GitHub Profile
@gerrywastaken
gerrywastaken / BsTester.php
Created October 17, 2011 16:11
A simple class to illustrate the inaccuracy of an answer on StackOverflow which has currently been upvoted by at least 23 "programmers" without a single one noticing this incorrect statement.
/**
* Just a simple demonstration after seeing an answer on StackOverflow relating to code auditing which despite
* gathering the most votes by far (currently 23) includes the following clearly inaccurate statement without
* a single comment pointing out the inaccurate claim.
*
* ========================================================================================================
* Quote from the current top answer on http://stackoverflow.com/questions/4273244/auditing-a-php-codebase:
* ========================================================================================================
* Accidental Assignment — More often than not, you'll see this happen in some non-critical component of the
* code, where it can sleep and/or lurk until you get an unexpected result one day: if ($foo = $this->bar()).