Personally, I don't call it a bug if people pass invalid arguments and it complains with an exception; but I've made some basic changes to support DateTime objects and objects with a __toString() method... Any other objects will throw a catchable fatal error, and it's up to user code to implement any exception handler to convert it to an exception and handle it