Convenience function to sort PHP namespaces