Last Updated: January 23, 2020
·
835
· eldadfux

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.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Related Tags
#php
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside