3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days = []; $searchData = ['dat' => '2015-11-13']; $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.0070.01116.63
8.3.50.0060.00918.31
8.3.40.0070.01419.05
8.3.30.0040.01118.92
8.3.20.0070.00020.29
8.3.10.0050.00323.66
8.3.00.0060.00319.50
8.2.180.0080.00618.66
8.2.170.0140.00022.96
8.2.160.0100.00320.51
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00419.50
8.2.120.0040.00426.35
8.2.110.0030.01020.64
8.2.100.0040.00718.05
8.2.90.0050.00319.33
8.2.80.0050.00317.97
8.2.70.0030.00617.88
8.2.60.0000.00817.80
8.2.50.0080.00018.07
8.2.40.0000.00819.52
8.2.30.0000.00720.59
8.2.20.0060.00317.90
8.2.10.0030.00518.12
8.2.00.0020.00518.35
8.1.280.0140.00725.92
8.1.270.0040.00423.97
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0090.00022.19
8.1.230.0090.00319.69
8.1.220.0050.00317.80
8.1.210.0030.00618.77
8.1.200.0050.00517.60
8.1.190.0100.00017.35
8.1.180.0030.00518.10
8.1.170.0000.00818.76
8.1.160.0000.00722.08
8.1.150.0000.00719.05
8.1.140.0070.00319.69
8.1.130.0000.00717.77
8.1.120.0040.00417.80
8.1.110.0040.00417.66
8.1.100.0050.00317.63
8.1.90.0070.00017.73
8.1.80.0020.00517.67
8.1.70.0040.00417.54
8.1.60.0000.00817.69
8.1.50.0030.00617.62
8.1.40.0080.00017.70
8.1.30.0000.00817.83
8.1.20.0030.00617.88
8.1.10.0040.00417.73
8.1.00.0050.00517.64
8.0.300.0040.00418.77
8.0.290.0000.00717.00
8.0.280.0000.00718.50
8.0.270.0030.00317.43
8.0.260.0070.00017.41
8.0.250.0030.00317.12
8.0.240.0070.00017.25
8.0.230.0070.00017.09
8.0.220.0040.00317.04
8.0.210.0050.00317.07
8.0.200.0000.00717.10
8.0.190.0090.00017.10
8.0.180.0040.00417.19
8.0.170.0040.00417.13
8.0.160.0080.00017.07
8.0.150.0000.01017.16
8.0.140.0040.00417.13
8.0.130.0060.00013.56
8.0.120.0040.00417.13
8.0.110.0070.00017.11
8.0.100.0000.00717.02
8.0.90.0000.00817.20
8.0.80.0080.00817.16
8.0.70.0050.00217.05
8.0.60.0040.00417.19
8.0.50.0020.00517.08
8.0.30.0070.01117.29
8.0.20.0110.00717.40
8.0.10.0020.00517.09
8.0.00.0100.00717.12
7.4.330.0000.00516.89
7.4.320.0030.00316.79
7.4.300.0070.00016.84
7.4.290.0030.00316.84
7.4.280.0070.00016.71
7.4.270.0000.00716.84
7.4.260.0030.00316.74
7.4.250.0070.00016.66
7.4.240.0040.00416.79
7.4.230.0030.00316.73
7.4.220.0070.01116.82
7.4.210.0100.00616.79
7.4.200.0070.00016.87
7.4.160.0140.00716.62
7.4.150.0060.01217.40
7.4.140.0150.00817.86
7.4.130.0140.00716.76
7.4.120.0070.01016.74
7.4.110.0060.01316.70
7.4.100.0100.01316.76
7.4.90.0070.01016.74
7.4.80.0130.00319.39
7.4.70.0170.00716.71
7.4.60.0130.00716.66
7.4.50.0140.00316.54
7.4.40.0090.00616.79
7.4.30.0120.00616.91
7.4.00.0070.01015.24
7.3.330.0030.00313.27
7.3.320.0000.00613.45
7.3.310.0040.00416.37
7.3.300.0070.00016.51
7.3.290.0030.00316.55
7.3.280.0090.00916.52
7.3.270.0060.01217.40
7.3.260.0100.00716.67
7.3.250.0070.01416.66
7.3.240.0080.01116.62
7.3.230.0130.01216.65
7.3.210.0180.00416.73
7.3.200.0060.01116.73
7.3.190.0030.01416.86
7.3.180.0130.01016.63
7.3.170.0090.01216.70
7.3.160.0060.01216.74
7.3.120.0040.01115.00
7.3.110.0000.01715.06
7.3.100.0030.01215.20
7.3.90.0100.00615.13
7.3.80.0070.00715.19
7.3.70.0030.01015.08
7.3.60.0040.01114.91
7.3.50.0070.00415.16
7.3.40.0080.00015.16
7.3.30.0030.00614.93
7.3.20.0090.00616.92
7.3.10.0100.00717.01
7.3.00.0040.00716.73
7.2.330.0090.00916.57
7.2.320.0040.01417.01
7.2.310.0070.01016.98
7.2.300.0120.01016.54
7.2.290.0060.01116.67
7.2.250.0160.00615.19
7.2.240.0060.01015.29
7.2.230.0000.01515.43
7.2.220.0030.00715.39
7.2.210.0030.01315.58
7.2.200.0030.01015.28
7.2.190.0060.00615.44
7.2.180.0030.01315.25
7.2.170.0070.00715.43
7.2.60.0030.01017.14
7.2.00.0000.01319.46
7.1.330.0030.01016.14
7.1.320.0000.01415.89
7.1.310.0030.01315.89
7.1.300.0070.00315.86
7.1.290.0000.01016.10
7.1.280.0000.01415.93
7.1.270.0090.00015.85
7.1.260.0030.01015.95
7.1.200.0040.00815.88
7.1.100.0000.01118.47
7.1.70.0030.00617.44
7.1.60.0110.01419.48
7.1.50.0110.00717.26
7.1.00.0070.07022.35
7.0.200.0420.01014.85
7.0.60.0100.03320.03
7.0.50.0070.05317.89
7.0.40.0070.04019.96
7.0.30.0270.05720.34
7.0.20.0370.05320.24
7.0.10.0100.08320.23
7.0.00.0000.05020.20
5.6.280.0070.06321.13
5.6.210.0030.04020.76
5.6.200.0000.04718.25
5.6.190.0070.04320.49
5.6.180.0300.07720.60
5.6.170.0400.04020.64
5.6.160.0100.07720.43
5.6.150.0030.08718.12
5.6.140.0000.04318.23
5.6.130.0070.08018.19
5.6.120.0070.07721.09
5.6.110.0030.08721.00
5.6.100.0070.06020.88
5.6.90.0070.08021.12
5.6.80.0070.08020.52
5.5.350.0000.09020.40
5.5.340.0000.04718.07
5.5.330.0070.04720.46
5.5.320.0200.05020.26
5.5.310.0200.03720.41
5.5.300.0070.04317.95
5.5.290.0030.04017.93
5.5.280.0100.06320.96
5.5.270.0200.06320.86
5.5.260.0100.08320.72
5.5.250.0100.05720.54
5.5.240.0270.07320.18

preferences:
52.83 ms | 400 KiB | 5 Q