I've created a PHP abstraction library to perform geocoding from all the known engines. See php-georev-class
repository. It work(ed) with all major public services but it was designed to work very well with nominatim geocoder. It's a bit aged as it was written before composer became popular.