PHP date_parse_from_format( ) alternative in PHP 5.2
问题 Since date_parse_from_format( ) is available only in PHP 5.3, I need to write a function that mimics its behaviour in PHP 5.2. Is it possible to write this function for PHP 5.2 and make it work exactly the same way that it does in PHP 5.3? Example: For this input: <?php $date = "6.1.2009 13:00+01:00"; print_r(date_parse_from_format("j.n.Y H:iP", $date)); ?> I need this output: Array ( [year] => 2009 [month] => 1 [day] => 6 [hour] => 13 [minute] => 0 [second] => 0 [fraction] => [warning_count]