|
update : 2015.11.03
php.shukuma.com검색:
|
DateTime::getLastErrorsdate_get_last_errors(PHP 5 >= 5.3.0, PHP 7) DateTime::getLastErrors -- date_get_last_errors — Returns the warnings and errors 설명객체 기반 형식
public static array DateTime::getLastErrors
( void
)
절차식 형식 Returns an array of warnings and errors found while parsing a date/time string. 인수이 함수는 인수가 없습니다. 반환값Returns array containing info about warnings and errors. 예제Example #1 DateTime::getLastErrors() example 객체 기반 형식
<?php절차식 형식
<?php위 예제들의 출력:
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
)
)
The indexes 6, and 0 in the example output refer to the character index in the string where the error occurred. |