3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days = []; $searchData = ['dat' => '2015-11-10']; $offset = 3; $now = date_create(); if (date_create($searchData['dat'])->modify('- '. $offset .' days') < $now) { $offsetStart = -1 * date_create($searchData['dat'])->diff($now)->format('%a'); } else { $offsetStart = -1 * $offset; } $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.0100.01016.75
8.3.50.0090.00618.18
8.3.40.0060.00918.77
8.3.30.0110.00318.93
8.3.20.0080.00020.09
8.3.10.0000.00823.40
8.3.00.0100.00019.63
8.2.180.0100.00518.41
8.2.170.0110.00722.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.00317.75
8.2.120.0050.00326.35
8.2.110.0070.00321.06
8.2.100.0180.00018.05
8.2.90.0040.00419.48
8.2.80.0040.00417.97
8.2.70.0000.00817.88
8.2.60.0040.00418.04
8.2.50.0030.00618.07
8.2.40.0050.00319.59
8.2.30.0000.00820.56
8.2.20.0040.00418.06
8.2.10.0040.00418.15
8.2.00.0040.00418.23
8.1.280.0150.00325.92
8.1.270.0080.00023.88
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00420.96
8.1.230.0090.00317.78
8.1.220.0000.00817.80
8.1.210.0000.00818.77
8.1.200.0040.00417.61
8.1.190.0040.00717.48
8.1.180.0000.00818.10
8.1.170.0050.00318.86
8.1.160.0070.00022.09
8.1.150.0050.00319.00
8.1.140.0090.00019.61
8.1.130.0040.00417.80
8.1.120.0050.00317.74
8.1.110.0000.00717.73
8.1.100.0050.00317.75
8.1.90.0000.00717.70
8.1.80.0080.00017.62
8.1.70.0000.00717.71
8.1.60.0040.00417.78
8.1.50.0080.00017.76
8.1.40.0030.00517.60
8.1.30.0000.00817.78
8.1.20.0000.00717.77
8.1.10.0040.00417.65
8.1.00.0080.00417.72
8.0.300.0000.00718.77
8.0.290.0040.00417.00
8.0.280.0030.00318.54
8.0.270.0000.00717.44
8.0.260.0070.00017.34
8.0.250.0000.00717.21
8.0.240.0000.00717.25
8.0.230.0000.00717.21
8.0.220.0000.00717.15
8.0.210.0000.01017.08
8.0.200.0000.00717.13
8.0.190.0040.00417.25
8.0.180.0040.00417.18
8.0.170.0040.00417.17
8.0.160.0000.00717.24
8.0.150.0000.00816.93
8.0.140.0000.00717.10
8.0.130.0030.00313.51
8.0.120.0040.00417.02
8.0.110.0070.00017.05
8.0.100.0050.00317.01
8.0.90.0030.00617.14
8.0.80.0100.01017.21
8.0.70.0060.00317.12
8.0.60.0040.00417.17
8.0.50.0000.00816.93
8.0.30.0080.01117.40
8.0.20.0110.00917.40
8.0.10.0030.00517.34
8.0.00.0100.00817.06
7.4.330.0000.00516.77
7.4.320.0000.00716.65
7.4.300.0030.00316.69
7.4.290.0030.00316.82
7.4.280.0000.00816.70
7.4.270.0000.00616.81
7.4.260.0070.00016.81
7.4.250.0080.00016.70
7.4.240.0040.00316.81
7.4.230.0030.00316.50
7.4.220.0180.00416.73
7.4.210.0120.00416.85
7.4.200.0040.00416.86
7.4.160.0070.01116.61
7.4.150.0100.01117.40
7.4.140.0100.00817.86
7.4.130.0090.01116.71
7.4.120.0070.01016.78
7.4.110.0060.01216.68
7.4.100.0180.00616.61
7.4.90.0120.00616.73
7.4.80.0090.00919.39
7.4.70.0140.00416.88
7.4.60.0060.01016.63
7.4.50.0070.01016.91
7.4.40.0160.00716.61
7.4.30.0100.00716.64
7.4.00.0060.00814.93
7.3.330.0000.00513.39
7.3.320.0050.00013.49
7.3.310.0000.00716.61
7.3.300.0040.00416.42
7.3.290.0000.00716.52
7.3.280.0080.01116.55
7.3.270.0100.01617.40
7.3.260.0070.01016.89
7.3.250.0120.00516.64
7.3.240.0130.00816.62
7.3.230.0140.00916.66
7.3.210.0070.01516.81
7.3.200.0090.01216.55
7.3.190.0140.00316.61
7.3.180.0140.00316.54
7.3.170.0190.00316.64
7.3.160.0040.01516.93
7.3.120.0090.00915.07
7.3.110.0080.00815.30
7.3.100.0070.00715.30
7.3.90.0070.01015.13
7.3.80.0100.00714.84
7.3.70.0120.00015.18
7.3.60.0120.00315.20
7.3.50.0060.00615.08
7.3.40.0030.01415.11
7.3.30.0030.01015.04
7.3.20.0030.00717.04
7.3.10.0040.00816.72
7.3.00.0070.01017.08
7.2.330.0090.00916.99
7.2.320.0120.00616.68
7.2.310.0080.00916.81
7.2.300.0140.00316.89
7.2.290.0090.01016.90
7.2.250.0090.00915.37
7.2.240.0090.00915.54
7.2.230.0040.01115.23
7.2.220.0110.00815.21
7.2.210.0100.00615.18
7.2.200.0100.00615.14
7.2.190.0060.00915.06
7.2.180.0030.01415.29
7.2.170.0070.01115.38
7.2.60.0120.00017.16
7.2.00.0000.01519.53
7.1.330.0070.00716.11
7.1.320.0060.00916.20
7.1.310.0030.00715.97
7.1.300.0000.01115.94
7.1.290.0040.01115.91
7.1.280.0090.00016.17
7.1.270.0030.01015.95
7.1.260.0060.00615.97
7.1.200.0090.00316.25
7.1.100.0100.00318.23
7.1.70.0030.00617.52
7.1.60.0090.01619.48
7.1.50.0040.01117.03
7.1.00.0000.07722.35
7.0.200.0290.00714.84
7.0.60.0030.04019.98
7.0.50.0100.06717.91
7.0.40.0030.04320.20
7.0.30.0230.07720.09
7.0.20.0230.08320.06
7.0.10.0170.07720.25
7.0.00.0100.04020.24
5.6.280.0000.07720.89
5.6.210.0000.04320.75
5.6.200.0030.04018.27
5.6.190.0070.04320.45
5.6.180.0300.04020.42
5.6.170.0470.04020.44
5.6.160.0070.07020.59
5.6.150.0030.05318.29
5.6.140.0070.07018.15
5.6.130.0030.09018.15
5.6.120.0130.08020.98
5.6.110.0070.08321.04
5.6.100.0070.06020.97
5.6.90.0130.04720.95
5.6.80.0130.06720.50
5.5.350.0070.06720.30
5.5.340.0030.03717.96
5.5.330.0130.06720.31
5.5.320.0270.06320.32
5.5.310.0230.03320.23
5.5.300.0100.03718.02
5.5.290.0100.08018.04
5.5.280.0070.06320.97
5.5.270.0170.03320.88
5.5.260.0130.07720.86
5.5.250.0070.08720.43
5.5.240.0330.09720.18

preferences:
49.54 ms | 400 KiB | 5 Q