×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: PHP
Posted by: Muhammad Khuram Javed
Added: Feb 27, 2016 11:01 AM
Views: 1946
Tags: no tags
  1.     public function namespaceExists($namespace) {
  2.         $namespace .= "\\";
  3.         foreach (get_declared_classes() as $name) {
  4.             if (strpos($name, $namespace) === 0) {
  5.                 echo true;
  6.             }
  7.         }
  8.         return false;
  9.     }