PHP date_parse() functionLast Updated : 17 Mar 2025 This date function work same as date_parse_from_format() that provides the complete information about the particular date in an specified format and return data in form of array. SyntaxParameters
ReturnThis function returns array with information about the parsed date on success or FALSE on failure. Example 1Output: Array ( [year] => 2018 [month] => 7 [day] => 10 [hour] => 12 [minute] => 30 [second] => 45 [fraction] => 0.5 [warning_count] => 0 [warnings] => Array Example 2Output: Array ( [year] => 2020 [month] => 7 [day] => 10 [hour] => 1 [minute] => 30 [second] => 60 [fraction] => 0 [warning_count] => 1 [warnings] => Array ( [22] => The parsed time was invalid ) [error_count] => 0 [errors] => Array ( ) [is_localtime] => ) Example 3Output: Array ( [year] => 2018 [month] => 7 [day] => 12 [hour] => 12 [minute] => 0 [second] => 0 [fraction] => 0.5 [warning_count] => 0 [warnings] => Array ( ) Next TopicPhp-date-sub-function |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India