3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = specialSetStartEndDate(['H (Zeitraum)' => '2015-07 2015-09']); echo($r); function specialSetStartEndDate($values, $params) { assert(array_key_exists('H (Zeitraum)', $values)); $period = $values['H (Zeitraum)']; $dates = explode(' ', $period); $start_date = DateTime::createFromFormat('Y-d', $dates[0]); $end_date = DateTime::createFromFormat('Y-d', $dates[1]); if (false == $start_date || false == $end_date) { throw new EWDRMI_Exception("Invalid input format of date '$period'", EWDRMI_Exception::BREAK_ROW); } $start_date->modify('first day of'); $end_date->modify('last day of'); $result = array( 'start_date' => $start_date->format('Y-m-d'), 'end_date' => $end_date->format('Y-m-d'), ); return $result; }

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)
8.3.60.0170.00316.50
8.3.50.0120.00721.20
8.3.40.0110.00418.84
8.3.30.0070.00718.88
8.3.20.0050.00220.16
8.3.10.0040.00421.89
8.3.00.0030.00321.76
8.2.180.0090.00616.63
8.2.170.0040.01122.96
8.2.160.0030.01020.57
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00421.07
8.2.120.0040.00426.35
8.2.110.0060.00322.20
8.2.100.0000.01219.39
8.2.90.0000.00917.63
8.2.80.0000.00818.84
8.2.70.0000.00917.80
8.2.60.0050.00317.50
8.2.50.0080.00017.62
8.2.40.0040.00419.32
8.2.30.0040.00419.26
8.2.20.0040.00419.47
8.2.10.0000.00718.01
8.2.00.0040.00417.98
8.1.280.0060.01225.92
8.1.270.0080.00021.99
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0000.00923.74
8.1.230.0000.01119.01
8.1.220.0090.00017.74
8.1.210.0060.00318.77
8.1.200.0000.00817.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0040.00420.77
8.1.150.0000.00820.54
8.1.140.0000.00819.47
8.1.130.0070.00017.63
8.1.120.0040.00417.29
8.1.110.0050.00317.36
8.1.100.0000.00817.34
8.1.90.0000.00717.37
8.1.80.0000.00817.34
8.1.70.0000.00817.25
8.1.60.0060.00317.44
8.1.50.0000.00817.53
8.1.40.0030.00517.44
8.1.30.0050.00317.68
8.1.20.0000.00717.46
8.1.10.0070.00017.44
8.1.00.0040.00417.46
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0030.00317.21
8.0.260.0030.00317.27
8.0.250.0030.00316.93
8.0.240.0000.00816.89
8.0.230.0070.00016.99
8.0.220.0030.00316.92
8.0.210.0040.00416.81
8.0.200.0040.00416.86
8.0.190.0030.00517.01
8.0.180.0070.00016.82
8.0.170.0080.00016.83
8.0.160.0000.00816.99
8.0.150.0070.00016.74
8.0.140.0030.00316.88
8.0.130.0000.00713.33
8.0.120.0040.00416.74
8.0.110.0040.00416.92
8.0.100.0000.00716.89
8.0.90.0030.00516.98
8.0.80.0080.00716.86
8.0.70.0040.00416.94
8.0.60.0070.00016.83
8.0.50.0050.00316.79
8.0.30.0050.01517.02
8.0.20.0120.00817.40
8.0.10.0070.00316.86
8.0.00.0100.01116.81
7.4.330.0000.00516.75
7.4.320.0060.00016.45
7.4.300.0030.00316.56
7.4.290.0000.00716.48
7.4.280.0080.00016.34
7.4.270.0070.00016.55
7.4.260.0050.00316.30
7.4.250.0050.00216.42
7.4.240.0070.00016.35
7.4.230.0030.00316.36
7.4.220.0110.00816.63
7.4.210.0080.00616.56
7.4.200.0000.00716.63
7.4.160.0080.00816.45
7.4.150.0150.00317.40
7.4.140.0180.00717.86
7.4.130.0100.00916.74
7.4.120.0080.01016.41
7.4.110.0080.00816.51
7.4.100.0000.01716.42
7.4.90.0140.00416.25
7.4.80.0100.00719.39
7.4.70.0140.00316.61
7.4.60.0030.01416.51
7.4.50.0050.00816.38
7.4.40.0090.00616.52
7.4.30.0110.00716.47
7.4.00.0000.01514.86
7.3.330.0030.00313.25
7.3.320.0030.00313.28
7.3.310.0030.00316.09
7.3.300.0000.00816.20
7.3.290.0080.00916.31
7.3.280.0110.00916.34
7.3.270.0070.01017.40
7.3.260.0070.01016.33
7.3.250.0120.00916.37
7.3.240.0090.00916.45
7.3.230.0160.00016.47
7.3.210.0030.01416.44
7.3.200.0070.01019.39
7.3.190.0030.01316.27
7.3.180.0150.00616.54
7.3.170.0060.01716.33
7.3.160.0130.00416.27
7.3.10.0200.01416.39
7.3.00.0170.01316.45
7.2.330.0110.00616.28
7.2.320.0130.00616.29
7.2.310.0060.01216.29
7.2.300.0030.01316.64
7.2.290.0030.01316.50
7.2.130.0070.01516.29
7.2.120.0260.00316.18
7.2.110.0280.01416.21
7.2.100.0160.01316.21
7.2.90.0120.01216.61
7.2.80.0390.00716.63
7.2.70.0180.01816.48
7.2.60.0110.00316.48
7.2.50.0250.00816.71
7.2.40.0790.00616.44
7.2.30.0280.01416.58
7.2.20.0560.00816.95
7.2.10.0170.01316.49
7.2.00.0100.00617.89
7.1.250.0230.00315.21
7.1.200.0040.00815.64
7.1.100.0080.00818.06
7.1.70.0050.00216.77
7.1.60.0130.01019.40
7.1.50.0090.00616.54
7.1.00.0070.07322.36
7.0.200.0040.00717.06
7.0.60.0300.05019.89
7.0.50.0000.04717.84
7.0.40.0030.05320.09
7.0.30.0200.05320.10
7.0.20.0230.06320.21
7.0.10.0100.05320.23
7.0.00.0130.03320.19
5.6.280.0030.06720.93
5.6.210.0070.05320.57
5.6.200.0170.07018.18
5.6.190.0030.04720.61
5.6.180.0070.06320.48
5.6.170.0230.04720.51
5.6.160.0170.07320.55
5.6.150.0100.07318.16
5.6.140.0070.03718.28
5.6.130.0100.05018.14
5.6.120.0070.05321.03
5.6.110.0100.08320.89
5.6.100.0030.07321.09
5.6.90.0100.07020.98
5.6.80.0130.06720.51
5.5.350.0270.06720.39
5.5.340.0170.07017.98
5.5.330.0200.04720.40
5.5.320.0470.07020.35
5.5.310.0300.07020.34
5.5.300.0000.05718.08
5.5.290.0170.04317.97
5.5.280.0000.06320.85
5.5.270.0070.08320.89
5.5.260.0000.06720.79
5.5.250.0130.06320.59
5.5.240.0200.08320.17

preferences:
45.44 ms | 401 KiB | 5 Q