<?php $path = "A000AA00"; $startA = microtime(true); for($i = 0; $i < 100000; $i++) { if (preg_match('~^[A-Z]\d{3}[A-Z]{2}\d{2}\z~', $path)) { // We good } } $endA = microtime(true); echo $endA-$startA;
You have javascript disabled. You will not be able to edit any code.