So I'm basically trying to create a tool that used across platforms, including sometimes legacy php version.
I don't plan on supporting anything less than 5.4 so I'd like to use something like below; however, instead of the application dying, I get various syntax errors. One of the first to start alerting is using brackets to define arrays.
Is there anyway to get around this?
if (version_compare(phpversion(), '5.4', '<')) {
die('This tool does not support anything < PHP 5.4<br>Your PHP version is: '.phpversion() );
}
$array= ['a','b','c'];
version_compare(). You have to stick to old syntax.