PHP Functions
A php function is an executable piece of code that performs a specific task. There are more than 1,000 built-in functions within the PHP distribution, and you can also create your own custom functions to achieve a particular programming goal.
PHP is a loosely typed language, meaning that it does not enforce the types of variables and arguments passed to functions. Often, PHP will do a bit of type juggling to convert an integer variable into a string argument before continuing execution. This is a result of the language being used as a general-purpose programming language.
There are some cases where you may want to specify the types of variables and arguments that a function accepts. For example, you might want to prevent a stack trace from printing the values of method parameters that are associated with sensitive data such as passwords or credentials. You can do this by annotating a parameter with the
pg_field_type() returns the base type name of a field in the given PostgreSQL result resource. It uses the PostgreSQL pg_type system table to look up the database field meta-data for a given OID. This function used to be called pg_field_type_oid().
pg_field_meta_data() returns the table definition for the given table as an array. This function is EXPERIMENTAL. Its behavior, API, and documentation might change in a future version of PHP. It expects a PgSql