If you interact with any of Amazon’s Web Services using PHP you should be using their SDK.
It’s very powerful and pretty simple to get started with.
In my case I did not want to checkout their whole repository into my frameworks namespace and decided to use .phar file they provided as
To me, using a .phar file for third party libraries kind of makes sense if I’m not planning to extend or overwrite any of the available functionality.
Plus if you have your own directory conventions and don’t want to bother re-factoring Amazon’s structure, .phar might come in handy.
The issue I ran into (not really an issue but inconsistency always bothers me as an engineer) is that if you are using namespaces and your own autoloader, requiring .phar file anywhere you need to access AWS is pretty ghetto.
The way I solved it is by using a very simple wrapper that either loads configuration (using \library\configuration as an example) containing your key/secret or takes key/secret as a constructor parameter and simply stores instance of AWS internally while routing all the calls directly to it.
You can check out this approach on my GitHub page located here: https://github.com/AlekseyKorzun/aws-sdk-wrapper
I have pretty high standards when it comes to code and felt like the current PHP 5 library that Twilio offered did not really fit well with modern frameworks.
So I decided to rewrite it, if you have your own framework and looking for a cleaner Twilio client make sure give this a try.
Find out more at: http://alekseykorzun.github.com/Twilio-PHP-5/