Created
April 8, 2019 09:31
-
-
Save CB9TOIIIA/461fca90a3a4bb73cff9616d4cf39279 to your computer and use it in GitHub Desktop.
version_compare PHP_VERSION
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (version_compare(PHP_VERSION, '7.0', '>=')) { | |
require_once __DIR__ . '/test.php'; // | |
} else { | |
require_once __DIR__ . '/test2.php'; // legacy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment