credit_card.php
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 24 行
PHP
24 行
<?phprequire_once 'Validate.php';function test($res, $expected) { static $no = 1; if ($res !== $expected) { echo "test $no failed\n"; } $no++;}// 1test(Validate::creditCard(0), false);// 2test(Validate::creditCard(-1), false);// 3test(Validate::creditCard('6762195515061813'), true);// 4test(Validate::creditCard('6762195515061814'), false);// 5test(Validate::creditCard(array('number' => '4405771709596026')), true);// 6test(Validate::creditCard('Big brother is watching you'), false);?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?