- var_dump: documentation ( source)
- preg_match: documentation ( source)
- parse_url: documentation ( source)
<?php
$site = "http://hollandshielding.com/";
$url = parse_url($site);
$hasSubdomain = preg_match('/(\w)\.(\w)\.(\w)/', $url['host']);
var_dump($subdomain);