PHP Version Enterprise Validation
When creating an enterprise web application, the small stuff might make the difference. This check could and will save you a lot of mess:
$phpVersion = '5.4.0';
if (0 > version_compare(PHP_VERSION, $phpVersion)) {
throw new Exception("Please update your PHP version");
}
If you want to write solid code - take nothing for granted.
Written by Eldad Fux
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Related Tags
#php
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#