3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dutch_date = "donderdag 27 maart 2014 00:30"; $converted_date = array(); $pattern = "#(?P<day_of_the_week>\w+)\ (?P<day>\d+)\ (?P<month>\w+)\ (?P<year>\d+)\ (?P<hour>\d+):(?P<minute>\d+)#s"; preg_match($pattern,$dutch_date, $converted_date); $date = ""; $date .= $converted_date["year"] . "-"; $datemap = array("januari"=>"01", "februari"=>"02", "maart"=>"03", "april"=>"04", "mei"=>"05", "juni"=>"06", "juli"=>"07", "augustus"=>"08", "september"=>"09", "oktober"=>"10", "november"=>"11", "december"=>"12"); $date .= $datemap[$converted_date["month"]]. "-"; $date .= $converted_date["day"]. " "; $date .= $converted_date["hour"] . ":"; $date .= $converted_date["minute"] .":00"; $format = 'Y-m-d H:i:s'; $date = DateTime::createFromFormat($format, $date); print_r($date); ?>
Output for git.master, git.master_jit, rfc.property-hooks
DateTime Object ( [date] => 2014-03-27 00:30:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.08 ms | 401 KiB | 8 Q