src/Analyse/Callback/AbstractCallback.php
protected function isPropertyNameNormal($propName)
    {
        static $cache = array();

        if (isset($cache[$propName])) {
            return $cache[$propName];
        }

        // The first regex detects all allowed characters.
        // For some reason, they also allow BOM characters.
        return $cache[$propName] = (bool) preg_match("/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", $propName) &&
            !(bool) preg_match("/[\xEF\xBB\xBF]$/", $propName);
    }
protected function isPropertyNameNormal($propName)
    {
        static $cache = array();

        if (isset($cache[$propName])) {
            return $cache[$propName];
        }

        // The first regex detects all allowed characters.
        // For some reason, they also allow BOM characters.
        return $cache[$propName] = (bool) preg_match("/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", $propName) &&
            !(bool) preg_match("/[\xEF\xBB\xBF]$/", $propName);
    }
protected function isPropertyNameNormal ( $ propName ) { static $ cache = array ( ) ; if ( isset ( $ cache [ $ propName ] ) ) { return $ cache [ $ propName ] ; } // The first regex detects all allowed characters. // For some reason, they also allow BOM characters. return $ cache [ $ propName ] = ( bool ) preg_match ( "/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/" , $ propName ) && ! ( bool ) preg_match ( "/[\xEF\xBB\xBF]$/" , $ propName ) ; }
Check for special chars in properties.

AFAIK this is only possible for dynamically declared properties
or some magical stuff from __get()

@see https://stackoverflow.com/questions/29019484/validate-a-php-variable
@author AbraCadaver

@param $propName
The property name we want to check.
@return bool
Whether we have a special char in there, or not.
Check for special chars in properties .