The code runs on the documentation web site for Hubspot and returns my data. I am replicating this on my system now.
I am using PHPStorm, I have installed the package and examples for V3 API and all referances dependents resolve to the proper Factory.php and the Vendors used through composer.
I have compiled the the code in run time in PHPStorm both on the local web server as well as the fully functinoal PHP web server hosted on an IIS server.
It would apper that the V3 API does not allow me to connect OR the hosting PHP server is missing some dependent.
Can you please explain a bit more about what you were trying to do and which API you used for this etc so that I can give you a proper solution for this?