You'll need to review the traversal spec and property retrieval methods for the SDK. You can look through the API Programming Guide.
The basic issue with PHP is that there is no official SDK toolkit for it, so you have to do the low level SOAP construction. For login/logout this is fairly simple (see the above example). For more complex operations (querying inventory data, performance metrics, etc) you'll have to build nested, complex SOAP objects by hand and deal with some quirks like the ManagedObjectReference slightly non-expected XML attributes (like ServiceInstance in above example).
I would encourage you to use an official toolkit vs PHP for this reason (you'll find all utility functions to retrieve objects are pre-built for you). If it's to be web embedded, Perl has several options and is officially supported. The non-supported Python bindings were released as well: https://github.com/vmware/pyvmomi
There were some PHP kits the community put together, but I can't speak to their current status or how complete they were. I did explore the PHP process years ago, but ultimately abandoned it. It was too time consuming. I was able to make much faster and more robust progress with Perl + HTML::Mason (which provides PHP like embedded Perl with inheritance).
For example, using the above thread, if you wanted to get all the VMs of a specific datacenter in Perl:
$my_dc_vms = Vim::find_entity_views(view_type => "VirtualMachine", begin_entity => $my_dc);
To do the same in the lower level API calls, you'd have to build TraversalSpecs, PropertySpecs, and ObjectSpecs using the SOAP constructions in PHP. However, if you do build these Specs, you can do very advanced filtering and searching on the SDK inventory efficiently.
But for a simple VM retrieval, learning the complete SDK inventory traversal operation and hand building the SOAP in PHP can be difficult, particularly if you're not already familiar with the VI SDK SOAP model.