This article describes a simple class that can be used to call PostgreSQL functions. Using the class has a number of advantages:
- PostgreSQL functions can be called like they are PHP method functions with no special syntax.
- The statements are automatically prepared giving faster execution for multiple calls.
- No string escaping is needed for prepared statements.
- The prepared statements are automatically deallocated when the object is destructed.