PHP date_get_last_errors() Function

Definition

The date_get_last_errors() function returns the warnings/errors found while parsing a date string.

Syntax

PHP date_get_last_errors() Function has the following syntax.

date_get_last_errors();

Return

PHP date_get_last_errors() Function returns an array that contains information about the errors/warnings.

Example

Get the warnings and errors while parsing a date string


<?php
date_create("asdfasdfasdfa");
print_r(date_get_last_errors());
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions