diff --git a/src/CreditCard.php b/src/CreditCard.php index 242f63802..75d659456 100644 --- a/src/CreditCard.php +++ b/src/CreditCard.php @@ -279,7 +279,7 @@ public function isValid($value) $foundl = false; foreach ($types as $type) { foreach ($this->cardType[$type] as $prefix) { - if (substr($value, 0, strlen($prefix)) == $prefix) { + if (0 === strpos($value, $prefix)) { $foundp = true; if (in_array($length, $this->cardLength[$type])) { $foundl = true;