added has_php helper.

This commit is contained in:
Taylor Otwell
2012-02-06 09:28:29 -06:00
parent 3dab550681
commit 8b2f3e8421

View File

@@ -373,4 +373,15 @@ function value($value)
function with($object)
{
return $object;
}
/**
* Determine if the current version of PHP is at least the supplied version.
*
* @param string $version
* @return bool
*/
function has_php($version)
{
return version_compare(PHP_VERSION, $version) >= 0;
}