3v4l.org

run code in 300+ PHP versions simultaneously
<?php function adjacentElementsProduct($inputArray) { $count = count($inputArray); if($count < 2 || $count > 10){ return false; } foreach($inputArray as $array){ if($array < - 1000 || $array > 1000){ return false; } } } echo adjacentElementsProduct([1001]);

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.00718.31
8.3.50.0090.00918.22
8.3.40.0040.01118.75
8.3.30.0090.00618.54
8.3.20.0080.00019.34
8.3.10.0080.00021.75
8.3.00.0030.00520.69
8.2.180.0180.00416.50
8.2.170.0150.00622.96
8.2.160.0130.00022.13
8.2.150.0050.00324.18
8.2.140.0000.00724.66
8.2.130.0080.00019.66
8.2.120.0040.00426.35
8.2.110.0080.00020.52
8.2.100.0090.00317.91
8.2.90.0030.00517.72
8.2.80.0030.00618.64
8.2.70.0040.00417.80
8.2.60.0050.00218.09
8.2.50.0050.00318.10
8.2.40.0000.00821.02
8.2.30.0040.00419.13
8.2.20.0000.00818.05
8.2.10.0050.00217.98
8.2.00.0040.00717.57
8.1.280.0120.00325.92
8.1.270.0060.00318.79
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0070.00319.07
8.1.230.0060.00617.71
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0050.00317.50
8.1.180.0000.00718.10
8.1.170.0060.00318.59
8.1.160.0040.00418.82
8.1.150.0040.00418.89
8.1.140.0000.00722.10
8.1.130.0050.00520.27
8.1.120.0050.00217.49
8.1.110.0000.00717.42
8.1.100.0040.00417.37
8.1.90.0000.00817.48
8.1.80.0040.00417.39
8.1.70.0000.00717.45
8.1.60.0040.00417.61
8.1.50.0060.00317.52
8.1.40.0000.00717.41
8.1.30.0000.00917.66
8.1.20.0070.00317.67
8.1.10.0000.00717.42
8.1.00.0040.00417.50
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.45
8.0.270.0030.00317.26
8.0.260.0060.00018.45
8.0.250.0000.00716.84
8.0.240.0070.00016.96
8.0.230.0030.00316.89
8.0.220.0060.00016.88
8.0.210.0030.00316.86
8.0.200.0040.00416.84
8.0.190.0030.00516.95
8.0.180.0030.00516.89
8.0.170.0030.00616.92
8.0.160.0040.00416.85
8.0.150.0000.00716.88
8.0.140.0000.00716.74
8.0.130.0030.00313.26
8.0.120.0090.00016.84
8.0.110.0000.00816.88
8.0.100.0040.00416.90
8.0.90.0070.00016.92
8.0.80.0040.01516.95
8.0.70.0080.00016.79
8.0.60.0040.00416.73
8.0.50.0050.00217.01
8.0.30.0030.01317.05
8.0.20.0030.01417.40
8.0.10.0000.00716.93
8.0.00.0090.01216.81
7.4.330.0000.00515.55
7.4.320.0040.00416.42
7.4.300.0030.00316.61
7.4.290.0030.00316.45
7.4.280.0030.00516.55
7.4.270.0070.00016.48
7.4.260.0050.00516.48
7.4.250.0040.00416.58
7.4.240.0030.00316.56
7.4.230.0000.00716.36
7.4.220.0050.00316.67
7.4.210.0030.01116.58
7.4.200.0070.00016.35
7.4.160.0110.00616.44
7.4.140.0100.00817.86
7.4.130.0040.02116.55
7.4.120.0090.01016.56
7.4.110.0030.01316.63
7.4.100.0030.01316.56
7.4.90.0180.00016.39
7.4.80.0040.01319.39
7.4.70.0090.00916.39
7.4.60.0090.00616.66
7.4.50.0030.01016.35
7.4.40.0070.01616.37
7.4.00.0090.00315.07
7.3.330.0050.00013.30
7.3.320.0050.00013.15
7.3.310.0000.00916.20
7.3.300.0020.00516.17
7.3.290.0030.00316.31
7.3.280.0030.01516.28
7.3.260.0110.00716.32
7.3.240.0120.00816.47
7.3.230.0090.00616.55
7.3.210.0120.00616.44
7.3.200.0000.01516.23
7.3.190.0090.00616.45
7.3.180.0100.00616.37
7.3.170.0030.01216.38
7.3.160.0030.01316.67
7.2.330.0070.01116.58
7.2.320.0150.00316.71
7.2.310.0100.00616.70
7.2.300.0030.01316.32
7.2.290.0150.00616.78
7.2.110.0280.00314.71
7.2.100.0200.00914.37
7.2.90.0450.00314.52
7.2.80.0360.01314.43
7.2.70.0400.00715.06
7.2.60.0270.01014.93
7.2.50.0340.00615.27
7.2.40.0410.00014.96
7.2.30.0440.01015.15
7.2.20.0630.00714.90
7.2.10.0910.00615.07
7.2.00.0570.00614.57
7.1.230.0240.00013.84
7.1.220.0350.00313.91
7.1.210.0350.00913.60
7.1.200.0330.01313.62
7.1.190.0600.00513.97
7.1.180.0400.00614.07
7.1.170.0230.01013.96
7.1.160.0570.00313.80
7.1.150.0410.01314.09
7.1.140.0480.01313.83
7.1.130.0430.01313.96
7.1.120.0520.00613.71
7.1.110.0450.01513.88
7.1.100.0620.00913.75
7.1.90.0620.00314.04
7.1.80.0540.00713.66
7.1.70.0650.01213.76
7.1.60.0810.01832.02
7.1.50.1610.01031.95
7.1.40.0720.00731.82
7.1.30.0730.01231.93
7.1.20.0730.01031.97
7.1.10.0580.01014.06
7.1.00.0360.01113.70
5.6.380.0030.01314.18

preferences:
42.97 ms | 400 KiB | 5 Q