isCcnum() public static method

Returns true if it is a valid credit card number format. The optional second argument allows developers to indicate the type.
public static isCcnum ( mixed $value, mixed $type = null ) : boolean
$value mixed
$type mixed
return boolean
Beispiel #1
0
 /**
  * @throws \Inspekt\Exception
  * @expectedException \Inspekt\Exception
  */
 public function testIsCcnumType()
 {
     $input = '5105105105105100';
     $this->assertTrue(Inspekt::isCcnum($input, 'mastercard'));
 }