From 8b2f3e842149bc6044f899dbf22a698cd3ebfefa Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 6 Feb 2012 09:28:29 -0600 Subject: [PATCH] added has_php helper. --- laravel/helpers.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/laravel/helpers.php b/laravel/helpers.php index 0700e550..028d8a82 100644 --- a/laravel/helpers.php +++ b/laravel/helpers.php @@ -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; } \ No newline at end of file