[PHP] date_get_last_errors()

date_get_last_errors() (funzione PHP) restituisce, sotto forma di array, gli eventuali warning ed error presenti nell’ultima stringa di una data processata.

tips&tricks

Sintassi

date_get_last_errors()
parametro descrizione
nessuno

Esempi

$data = date_create('abcdefghi');
print_r(date_get_last_errors());

/* RISULTATO
Array
(
    [warning_count] => 1
    [warnings] => Array
        (
            [6] => Double timezone specification
        )
    [error_count] => 1
    [errors] => Array
        (
            [0] => The timezone could not be found in the database
        )
)
*/

Contenuti correlati

  • CSS
  • HTML
  • JavaScript
  • jQuery
  • PHP
  • SQL
  • WORDPRESS

Fonti esterne

funzioni php, php

Related Articles

0 Comment