3v4l.org

run code in 300+ PHP versions simultaneously
<?php //the dutch date $dutch_date = "donderdag 27 maart 2014 00:30"; //split it in usable parts $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); //create the empty date, we'll store our date in this variable in "D, d F Y H:i:s GMT" format $date = ""; //create the "D, "-part $daymap = array("maandag" => "Mon", "dinsdag"=>"Tue", "woensdag"=>"Wed", "donderdag"=>"Thu", "vrijdag"=>"Fri", "zaterdag"=>"Sat", "zondag"=>"Sun"); $date .= $daymap[$converted_date["day_of_the_week"]].", "; //create the "d " part $date .= $converted_date["day"]. " "; //create the "F " part $datemap = array("januari"=>"Jan", "februari"=>"Feb", "maart"=>"Mar", "april"=>"Apr", "mei"=>"May", "juni"=>"Jun", "juli"=>"Jul", "augustus"=>"Aug", "september"=>"Sep", "oktober"=>"Okt", "november"=>"Nov", "december"=>"Dec"); $date .= $datemap[$converted_date["month"]]. " "; //create the "Y " part $date .= $converted_date["year"] . " "; //create the "H:" part if ($converted_date["hour"] == "00"){ $converted_date["hour"] = "23"; } elseif ($converted_date["hour"] == "10"){ $converted_date["hour"] = "09"; } elseif ($converted_date["hour"] == "20"){ $converted_date["hour"] = "19"; } else{ $converted_date["hour"] = substr($converted_date["hour"], 0, 1).(substr($converted_date["hour"], 0, 1) - 1); $date .= $converted_date["hour"] . ":"; //create the "i:s" part $date .= $converted_date["minute"] .":00 GMT"; echo $date; ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.270.0170.06019.16
5.4.260.0270.05318.79
5.4.250.0330.03719.07
5.4.240.0370.05719.07
5.4.230.0230.07018.82
5.4.220.0230.06719.11
5.4.210.0300.04719.13
5.4.200.0300.06719.21
5.4.190.0270.06319.12
5.4.180.0270.07019.08
5.4.170.0200.05019.05
5.4.160.0200.04318.86
5.4.150.0230.07319.13
5.4.140.0130.05016.23
5.4.130.0130.07716.26
5.4.120.0200.03716.26
5.4.110.0130.03716.06
5.4.100.0200.04016.41
5.4.90.0170.03316.31
5.4.80.0230.02716.41
5.4.70.0270.03016.20
5.4.60.0130.03716.43
5.4.50.0230.06316.40
5.4.40.0200.03016.37
5.4.30.0200.05316.38
5.4.20.0170.04716.29
5.4.10.0200.03316.47
5.4.00.0070.04015.74
5.3.280.0300.07014.59
5.3.270.0300.04314.57
5.3.260.0300.04014.46
5.3.250.0200.06314.66
5.3.240.0230.07014.45
5.3.230.0270.07014.46
5.3.220.0200.03314.54
5.3.210.0130.03714.53
5.3.200.0230.03714.44
5.3.190.0130.04014.44
5.3.180.0130.04014.67
5.3.170.0230.02714.63
5.3.160.0130.04714.51
5.3.150.0130.03714.44
5.3.140.0200.03014.40
5.3.130.0070.04714.42
5.3.120.0170.04314.47
5.3.110.0200.03714.40
5.3.100.0070.04314.00
5.3.90.0100.04014.00
5.3.80.0130.03713.87
5.3.70.0170.03313.88
5.3.60.0100.03714.11
5.3.50.0130.04013.86
5.3.40.0100.04313.84
5.3.30.0170.03013.72
5.3.20.0130.03313.70
5.3.10.0230.02313.63
5.3.00.0130.03313.52
5.2.170.0130.03013.52
5.2.160.0170.02313.52
5.2.150.0130.02713.52
5.2.140.0100.03013.52
5.2.130.0200.02013.52
5.2.120.0070.03713.52
5.2.110.0130.02713.52
5.2.100.0100.02713.52
5.2.90.0130.02713.52
5.2.80.0130.03013.52
5.2.70.0100.03313.52
5.2.60.0170.02313.52
5.2.50.0100.03013.52
5.2.40.0100.02713.52
5.2.30.0100.03713.52
5.2.20.0100.02713.52
5.2.10.0070.03013.52
5.2.00.0070.03013.52
5.1.60.0100.02313.52
5.1.50.0170.04013.52
5.1.40.0130.05713.52
5.1.30.0130.05313.52
5.1.20.0230.05013.52
5.1.10.0130.05713.52
5.1.00.0170.05313.52
5.0.50.0170.03713.52
5.0.40.0030.03713.52
5.0.30.0100.05013.52
5.0.20.0100.03713.52
5.0.10.0070.02013.52
5.0.00.0070.03013.52
4.4.90.0030.01713.52
4.4.80.0030.01713.52
4.4.70.0030.01713.52
4.4.60.0070.01313.52
4.4.50.0030.01713.52
4.4.40.0100.03013.52
4.4.30.0070.02313.52
4.4.20.0070.03313.52
4.4.10.0100.03013.52
4.4.00.0170.04713.52
4.3.110.0070.03713.52
4.3.100.0070.03313.52
4.3.90.0170.01313.52
4.3.80.0030.05313.52
4.3.70.0100.01713.52
4.3.60.0030.03313.52
4.3.50.0100.03013.52
4.3.40.0100.05013.52
4.3.30.0030.03713.52
4.3.20.0070.03313.52
4.3.10.0100.02013.52
4.3.00.0030.02313.52

preferences:
140.36 ms | 1394 KiB | 7 Q