3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days = []; $searchData = ['dat' => '2015-11-10']; $offset = 3; $now = date_create(); $offsetStart = -1 * $offset; if (date_create($searchData['dat'])->modify($offset .' days') < $now) { $offsetStart = -1 * date_create($searchData['dat'])->diff($now)->format('%a'); } $offsetEnd = 2 * $offset + $offsetStart; for ($i = $offsetStart; $i <= $offsetEnd; $i++) { $days[] = $i; } print_r($days);

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.0140.00416.73
8.3.50.0120.00522.05
8.3.40.0150.00019.22
8.3.30.0120.00318.87
8.3.20.0040.00420.33
8.3.10.0080.00023.67
8.3.00.0040.00419.51
8.2.180.0040.01120.30
8.2.170.0070.00722.96
8.2.160.0140.00020.53
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00819.61
8.2.120.0040.00426.35
8.2.110.0060.00320.47
8.2.100.0030.00918.18
8.2.90.0030.00519.48
8.2.80.0050.00317.97
8.2.70.0080.00018.00
8.2.60.0000.00818.15
8.2.50.0060.00318.07
8.2.40.0000.00819.34
8.2.30.0070.00020.66
8.2.20.0060.00317.90
8.2.10.0000.00718.19
8.2.00.0030.00518.22
8.1.280.0130.01025.92
8.1.270.0070.01322.31
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0050.00523.97
8.1.230.0090.00319.57
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0000.00817.50
8.1.190.0060.00317.35
8.1.180.0080.00018.10
8.1.170.0000.00718.89
8.1.160.0070.00022.02
8.1.150.0040.00419.04
8.1.140.0030.00619.73
8.1.130.0000.00817.81
8.1.120.0040.00417.74
8.1.110.0000.00717.62
8.1.100.0040.00417.72
8.1.90.0000.00717.76
8.1.80.0070.00017.65
8.1.70.0000.00717.73
8.1.60.0000.00817.69
8.1.50.0040.00417.73
8.1.40.0030.00517.78
8.1.30.0050.00317.86
8.1.20.0000.00817.80
8.1.10.0030.00617.70
8.1.00.0030.00617.72
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0000.00718.53
8.0.270.0000.00717.42
8.0.260.0030.00317.33
8.0.250.0070.00017.15
8.0.240.0000.00717.20
8.0.230.0030.00317.20
8.0.220.0040.00417.14
8.0.210.0040.00417.09
8.0.200.0000.00717.25
8.0.190.0040.00417.19
8.0.180.0070.00017.20
8.0.170.0000.00817.25
8.0.160.0040.00417.18
8.0.150.0080.00017.13
8.0.140.0040.00417.13
8.0.130.0060.00013.49
8.0.120.0000.00817.15
8.0.110.0040.00417.23
8.0.100.0000.00716.96
8.0.90.0030.00517.14
8.0.80.0060.00917.18
8.0.70.0030.00617.06
8.0.60.0040.00417.10
8.0.50.0040.00417.05
8.0.30.0070.01217.42
8.0.20.0070.01217.44
8.0.10.0000.00817.30
8.0.00.0100.01116.97
7.4.330.0050.00016.71
7.4.320.0000.00716.75
7.4.300.0000.00616.83
7.4.290.0070.00016.77
7.4.280.0030.00616.78
7.4.270.0030.00316.68
7.4.260.0000.00716.64
7.4.250.0000.00816.70
7.4.240.0040.00416.79
7.4.230.0000.00716.91
7.4.220.0120.00616.83
7.4.210.0080.00916.70
7.4.200.0040.00416.64
7.4.160.0130.00316.73
7.4.150.0030.01417.40
7.4.140.0120.01917.86
7.4.130.0130.00916.83
7.4.120.0110.01016.81
7.4.110.0030.01516.61
7.4.100.0090.00916.65
7.4.90.0100.01316.65
7.4.80.0120.00619.39
7.4.70.0110.00816.86
7.4.60.0000.01616.60
7.4.50.0060.01016.65
7.4.40.0160.00016.69
7.4.30.0090.00916.91
7.4.00.0000.01115.13
7.3.330.0030.00313.37
7.3.320.0000.00613.38
7.3.310.0040.00416.51
7.3.300.0070.00016.53
7.3.290.0040.00416.53
7.3.280.0120.00916.54
7.3.270.0120.00617.40
7.3.260.0100.00716.66
7.3.250.0060.01116.65
7.3.240.0110.00816.72
7.3.230.0000.01616.49
7.3.210.0030.01516.72
7.3.200.0090.00816.66
7.3.190.0140.00316.55
7.3.180.0070.01116.62
7.3.170.0160.00316.57
7.3.160.0060.00916.76
7.3.120.0030.00715.00
7.3.110.0070.01015.31
7.3.100.0060.01015.18
7.3.90.0000.00914.93
7.3.80.0110.00315.16
7.3.70.0110.00715.07
7.3.60.0030.01215.18
7.3.50.0060.00915.09
7.3.40.0100.00615.22
7.3.30.0030.01015.00
7.3.20.0030.01016.93
7.3.10.0070.01116.73
7.3.00.0110.00616.86
7.2.330.0070.01017.08
7.2.320.0130.01017.05
7.2.310.0120.00916.71
7.2.300.0110.00717.02
7.2.290.0000.01816.74
7.2.250.0030.01514.98
7.2.240.0070.01015.29
7.2.230.0060.01015.57
7.2.220.0070.00414.81
7.2.210.0110.00715.55
7.2.200.0070.00715.29
7.2.190.0030.00915.36
7.2.180.0060.00315.07
7.2.170.0100.00715.34
7.2.160.0030.00715.02
7.2.150.0130.00017.13
7.2.140.0000.01417.02
7.2.130.0110.01016.94
7.2.120.0080.00717.08
7.2.110.0090.01116.79
7.2.100.0060.01216.95
7.2.90.0060.00916.75
7.2.80.0080.00816.88
7.2.70.0100.00916.93
7.2.60.0100.00517.03
7.2.50.0100.00516.76
7.2.40.0030.00916.91
7.2.30.0100.00816.81
7.2.20.0140.00516.81
7.2.10.0100.00716.98
7.2.00.0100.00518.02
7.1.330.0040.01215.99
7.1.320.0000.00915.95
7.1.310.0110.00716.25
7.1.300.0030.01016.02
7.1.290.0080.00316.11
7.1.280.0090.00616.06
7.1.270.0070.00416.07
7.1.260.0070.00715.85
7.1.250.0100.00915.60
7.1.200.0090.00016.16
7.1.100.0000.01118.28
7.1.70.0040.00417.35
7.1.60.0140.01019.48
7.1.50.0070.01417.05
7.1.00.0000.08022.31
7.0.200.0300.00915.21
7.0.60.0030.04019.95
7.0.50.0070.04017.89
7.0.40.0070.07320.26
7.0.30.0300.05320.34
7.0.20.0370.07320.27
7.0.10.0030.04720.09
7.0.00.0070.07320.18
5.6.280.0100.04321.04
5.6.210.0000.05020.60
5.6.200.0030.04018.15
5.6.190.0100.04020.79
5.6.180.0330.06720.33
5.6.170.0300.08020.50
5.6.160.0100.06720.59
5.6.150.0000.05718.27
5.6.140.0070.08018.18
5.6.130.0170.06318.11
5.6.120.0130.08020.99
5.6.110.0070.08320.89
5.6.100.0100.04320.99
5.6.90.0170.06321.10
5.6.80.0100.06720.38
5.5.350.0100.07320.28
5.5.340.0070.03718.08
5.5.330.0000.06020.25
5.5.320.0400.07020.27
5.5.310.0100.04720.18
5.5.300.0030.08018.08
5.5.290.0100.07317.97
5.5.280.0070.04020.87
5.5.270.0170.04720.72
5.5.260.0100.07020.93
5.5.250.0130.05720.56
5.5.240.0230.08020.35

preferences:
55.58 ms | 401 KiB | 5 Q