The reason you are receiving that error is because expiry() isn't a function in the PHP library. At this time you cannot set universal expiry in the PHP library, but you can set expiry on the iOS and Android platform overrides:
$response = $airship->push()
This should ensure the notifications expire three hours after being sent. Please let me know if you have any other questions or concerns.