inNamespace('Vehicle'); var_dump($isInNamespace); // bool(true)
inNamespace('Package\Library'); var_dump($isFromPackage); // bool(true)In this example, we require an external package using `autoload.php` file. We create an object of a class from that package and use `ReflectionClass` to reflect on that object. We then use `inNamespace` to determine whether the object belongs to that specific package or library. The boolean result of `true` tells us that the object indeed belongs to the package.