3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tracking = '1Z0ER5190360727519'; if(count(preg_match("/\b(1Z ?[0-9A-Z]{3} ?[0-9A-Z]{3} ?[0-9A-Z]{2} ?[0-9A-Z]{4} ?[0-9A-Z]{3} ?[0-9A-Z]|[\dT]\d\d\d ?\d\d\d\d ?\d\d\d)\b/i", $tracking))==1){print "UPS";} if(count(preg_match("/\b((96\d\d\d\d\d ?\d\d\d\d|96\d\d) ?\d\d\d\d ?d\d\d\d( ?\d\d\d)?)\b/i", $tracking))==1){print "FedEx";} if(count(preg_match("/\b(91\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d|91\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d ?\d\d\d\d)\b/i", $tracking))==1){print "USPS";} var_dump(preg_match("/\b((96\d\d\d\d\d ?\d\d\d\d|96\d\d) ?\d\d\d\d ?d\d\d\d( ?\d\d\d)?)\b/i", $tracking));
Output for 4.3.0 - 7.1.0
UPSFedExUSPSint(0)