Quantcast
Channel: Chris Nizzardini
Viewing all articles
Browse latest Browse all 39

Unscientific Benchmarking of Type Casting, is_numeric, and regex in PHP

$
0
0
I performed some unscientific PHP benchmarks today pitting casting to an integer against is_numeric against preg_replace. The point was to see which is the fastest way of quickly cleaning user input before passing to a SQL query to prevent against SQL injection. Obviously this would only work on database fields that are integers. To be... Read more »

Viewing all articles
Browse latest Browse all 39

Trending Articles