1. There is no relevant code before or after this line. 2. Yes, one would think a ! should be there as did I (I didn't write the code), however, even with the ! it still gives the same error.
if (function_exists('gzcompress')) die(FUNCTION_NOT_FOUND); is giving me a
syntax error, unexpected 'if', expecting 'function' or 'const'
I am updating this code from PHP5.3 to PHP7.4 and I can't figure out what the syntax problem is since PHP allows this. I am using Eclipse PHP to do the conversion.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Syntax error thrown when no syntax error
in PHP Coding Help
Posted
The issue is there seems to be NO syntax error.
1. There is no relevant code before or after this line. 2. Yes, one would think a ! should be there as did I (I didn't write the code), however, even with the ! it still gives the same error.
if (function_exists('gzcompress')) die(FUNCTION_NOT_FOUND); is giving me a
syntax error, unexpected 'if', expecting 'function' or 'const'
I am updating this code from PHP5.3 to PHP7.4 and I can't figure out what the syntax problem is since PHP allows this. I am using Eclipse PHP to do the conversion.