<?php function starts_with_caps($s) { $starts_with_caps_regex = '/^[A-Z]/'; return preg_match($starts_with_caps_regex, $s) ? true : false; }