Original code by Maarten

source: http://www.gmot.nl/index.php?topic=26371.msg805848#msg805848
Code consistency
Enforcing PHP >= 5.4
Reverting varDiff to vardiff

Using CamelCase makes more sense indeed
Merge pull request #2 from JochemKuijpers/bandwidthmerge

Merge to master