$location) { $prefixLen = strlen($prefix); if (strncmp($classPath, $prefix, $prefixLen) == 0) { $classPath = "$location/". substr($classPath, $prefixLen); break; } } if ($classPath[0] != '/') $classPath = stream_resolve_include_path($classPath); if (file_exists($classPath)) require_once $classPath; });