Why not simply if ($raw && defined('PHP_QUERY_RFC3986')) inside the function?