- microtime: documentation ( source)
- preg_match: documentation ( source)
<?php
$t = microtime(true);
for ($i = 0; $i < 9000; $i++) {
preg_match('/^[^\:]++(\:[^\:]++)*$/', '12345678901234567890:12345678901234567890');
preg_match('/^[^\:]++(\:[^\:]++)*$/', '1234567890123456789012345678901234567890:');
}
echo (microtime(true) - $t);