I have an issue that is quite puzzling me.
I have a php script running on 2 different shared hostings.
On the first one everything runs flawlessly. On the second one it outputs me a syntax error and doesn't work.
Here is the syntax error and the code that is giving issues:
Parse error: syntax error, unexpected '[' in /home/click/public_html/extension/include/config.php on line 13
Code:
function pem2der($pem_data) {
return base64_decode(trim(explode('-----', $pem_data)[2]));
}
I can't seem to find the issue. Anyone could give me some help? Thanks in advance