// Substitue path to script with the version information in place of __FILE__ if necessary
$script = file_get_contents(__FILE__);
$version = SOME_SENSIBLE_DEFAULT_IN_CASE_OF_FAILURE;
if(preg_match('//', $script, $version_match)) {
$version = $version_match[1];
}