The term "virus scanner" is grossly misleading for several reasons.
The most obvious reason is that the very definition of a
computer virus doesn't fit by any stretch of imagination to the way PHP works. As a result there can be no such thing as a "PHP virus". This is marketing hype.
The second reason is that a virus scanner uses signatures and heuristics to analyse binary code. Since we are talking about source code, the term "virus scanner" is merely marketing hype. It's like calling a bottled water dispenser an "advanced dissemination device of self-contained personalised rations of performance enhancing mineral-enriched hydrogen oxide". Sounds cool, but it's definitely not.
So, what is it? It's simply some code which scans PHP files against some predefined signatures of potentially malicious code structures. The same thing we have in PHP File Change Scanner to calculate the "Threat Level" (which, too, is marketing hype for saying "a number which should show you how likely is a file to be malicious code").
I resisted the urge to call it a "virus scanner" because I don't like giving fancy names to dull things to make me sound smart. I prefer to write smart code and give it a dull name instead.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!