(PHP 3 >= 3.0.3, PHP 4, PECL)
Returns the last error number. If the return value is 0 no error has occurred. The error relates to the last command.