I receive a weird error when testing a WordPress plugin I developed on my server.
I tested locally with PHP5.3.29 (PHPBrew) and PHP7. I get the following error
Parse error: syntax error, unexpected 'empty' (T_EMPTY), expecting identifier (T_STRING) in /home/arevicoc/sub_domains/fitmetfriso.nl/wp-content/plugins/wp-clickbank-vendor/core/Helper/Util.php on line 65
The function itself is rather simple (i get the error on the definition of the function
/**
* Check if it is empty for a multi-dimensional array
*
* @param object $object
* @param string $name
* @return void
*/
public static function empty($object, $name){ // Line 65
return empty(self::val($object,$name, null));
}
CPanel of the server I've been testing on lists ea-php55.
Why is this error occurring? I know empty is a function in PHP, but if inside a namespace, there shouldn't be a conflict right? especially since it works in development.
Any reason why this use of reserved keywords as class function name is allowed in php 7?
Thank you in advance :)