Welcome Guest, Not a member yet? Register   Sign In
Credit card helper
#2

[eluser]Aken[/eluser]
Regex is slower than substr anyway Smile

I can tell you that you don't need to assign a variable when returning the matching card names. That variable loses scope anyway, so it's useless.

There are other changes I would make, but they're either personal preference or incredibly insignificant unless you're running this function thousands of times.

That Luhn check is actually what's crappy - maybe you should rewrite that one yourself! Smile


Messages In This Thread
Credit card helper - by El Forum - 02-19-2012, 06:46 PM
Credit card helper - by El Forum - 02-20-2012, 12:58 AM
Credit card helper - by El Forum - 02-20-2012, 01:16 AM
Credit card helper - by El Forum - 02-20-2012, 01:55 AM
Credit card helper - by El Forum - 02-20-2012, 03:40 AM
Credit card helper - by El Forum - 02-20-2012, 12:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB