name || 'parent' == $this->name) { // 'static' cannot occur throw new PHPParser_Error(sprintf('Cannot use "%s" as class name as it is reserved', $this->name)); } foreach ($this->extends as $interface) { if ('self' == $interface || 'parent' == $interface || 'static' == $interface) { throw new PHPParser_Error(sprintf('Cannot use "%s" as interface name as it is reserved', $interface)); } } } }