3v4l.org

run code in 300+ PHP versions simultaneously
<?php function floorDiff(string $input): int { if ($input === '(') { return 1; } if ($input === ')') { return -1; } } assert(floorDiff('(') === 1); assert(floorDiff(')') === -1); assert(floorDiff('()') === 0);

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.0110.00716.71
8.3.50.0130.00822.04
8.3.40.0110.00418.70
8.3.30.0040.01418.89
8.3.20.0040.00420.30
8.3.10.0060.00323.61
8.3.00.0050.00319.98
8.2.180.0090.00916.50
8.2.170.0120.00922.96
8.2.160.0140.00720.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00319.23
8.2.120.0080.00026.35
8.2.110.0060.00322.10
8.2.100.0090.00317.68
8.2.90.0060.00319.13
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0030.00618.03
8.2.50.0060.00318.07
8.2.40.0030.00622.37
8.2.30.0040.00420.61
8.2.20.0050.00217.59
8.2.10.0000.00718.04
8.2.00.0040.00418.12
8.1.280.0070.01425.92
8.1.270.0040.00720.32
8.1.260.0000.00728.09
8.1.250.0050.00228.09
8.1.240.0060.00323.82
8.1.230.0040.00819.01
8.1.220.0070.00017.74
8.1.210.0000.01118.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0060.00318.68
8.1.160.0040.00420.56
8.1.150.0000.00718.80
8.1.140.0040.00419.36
8.1.130.0000.00817.48
8.1.120.0040.00417.34
8.1.110.0030.00517.28
8.1.100.0040.00417.22
8.1.90.0000.00717.18
8.1.80.0080.00017.21
8.1.70.0070.00017.21
8.1.60.0040.00417.52
8.1.50.0040.00417.45
8.1.40.0000.00717.46
8.1.30.0000.00817.49
8.1.20.0050.00317.55
8.1.10.0000.00817.48
8.1.00.0030.00517.34
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.29
8.0.270.0030.00317.19
8.0.260.0000.00617.05
8.0.250.0000.00617.00
8.0.240.0050.00316.89
8.0.230.0000.00716.82
8.0.220.0070.00016.77
8.0.210.0030.00316.85
8.0.200.0060.00016.86
8.0.190.0000.01116.79
8.0.180.0070.00016.84
8.0.170.0080.00016.91
8.0.160.0050.00216.85
8.0.150.0070.00016.89
8.0.140.0070.00016.86
8.0.130.0000.00513.30
8.0.120.0080.00016.75
8.0.110.0040.00416.82
8.0.100.0040.00416.91
8.0.90.0040.00416.94
8.0.80.0120.00416.90
8.0.70.0000.00716.78
8.0.60.0050.00316.75
8.0.50.0080.00016.76
8.0.30.0150.00417.09
8.0.20.0060.01217.40
8.0.10.0070.00016.93
8.0.00.0070.01016.59
7.4.330.0050.00016.73
7.4.320.0000.00716.35
7.4.300.0030.00316.42
7.4.290.0000.00616.48
7.4.280.0050.00216.50
7.4.270.0060.00016.35
7.4.260.0030.00316.36
7.4.250.0040.00416.43
7.4.240.0030.00316.54
7.4.230.0000.00716.61
7.4.220.0130.00616.48
7.4.210.0120.00316.50
7.4.200.0000.00716.65
7.4.160.0040.01216.71
7.4.150.0060.01017.40
7.4.140.0080.01117.86
7.4.130.0110.00716.56
7.4.120.0100.01016.43
7.4.110.0130.00316.62
7.4.100.0060.01316.52
7.4.90.0140.00316.48
7.4.80.0090.01219.39
7.4.70.0030.01316.37
7.4.60.0100.00716.38
7.4.50.0100.00316.56
7.4.40.0150.00316.41
7.4.30.0170.00716.26
7.4.00.0050.01314.99
7.3.330.0000.00513.42
7.3.320.0000.00513.45
7.3.310.0030.00616.49
7.3.300.0060.00016.39
7.3.290.0080.00816.42
7.3.280.0090.00716.46
7.3.270.0080.00917.40
7.3.260.0070.01016.65
7.3.250.0090.01016.50
7.3.240.0160.00416.50
7.3.230.0090.00816.39
7.3.210.0030.01416.48
7.3.200.0100.00616.35
7.3.190.0030.01316.44
7.3.180.0160.00016.50
7.3.170.0090.00916.45
7.3.160.0060.01016.60
7.3.120.0060.01315.01
7.3.110.0000.01815.06
7.3.100.0040.01114.90
7.3.90.0090.00315.05
7.3.80.0000.01515.05
7.3.70.0000.00914.67
7.3.60.0040.00714.99
7.3.50.0110.00414.85
7.3.40.0090.00614.81
7.3.30.0070.01014.89
7.3.20.0060.00616.75
7.3.10.0030.01116.77
7.3.00.0090.00516.56
7.2.330.0060.01016.64
7.2.320.0120.01216.41
7.2.310.0060.01016.27
7.2.300.0100.00716.40
7.2.290.0140.00316.63
7.2.250.0130.00615.07
7.2.240.0030.01715.18
7.2.230.0030.01314.77
7.2.220.0040.00815.14
7.2.210.0070.01014.90
7.2.200.0040.01114.84
7.2.190.0070.00315.06
7.2.180.0060.01014.73
7.2.170.0070.00314.98
7.2.130.0090.00016.79
7.2.120.0060.00616.91
7.2.110.0090.00616.87
7.2.100.0030.00916.91
7.2.90.0030.01016.66
7.2.80.0020.01016.59
7.2.70.0060.00316.76
7.2.60.0100.00316.73
7.2.50.0030.00616.99
7.2.40.0090.00616.93
7.2.30.0090.00616.93
7.2.20.0060.00616.96
7.2.10.0150.00316.88
7.2.00.0070.00718.00
7.1.330.0030.00915.73
7.1.320.0070.00715.86
7.1.310.0080.00615.96
7.1.300.0050.00515.57
7.1.290.0120.00615.82
7.1.280.0060.01115.95
7.1.270.0060.00615.74
7.1.260.0000.01315.71
7.1.250.0100.00315.64
7.1.200.0040.01115.72
7.1.100.0060.00318.02
7.1.70.0000.00717.25
7.1.60.0090.01519.52
7.1.50.0030.01716.70
7.1.00.0100.07022.36
7.0.200.0060.00316.75
7.0.60.0170.07020.04
7.0.50.0070.03717.90
7.0.40.0070.04020.11
7.0.30.0300.05720.08
7.0.20.0300.08020.15
7.0.10.0000.09020.33
7.0.00.0100.06720.05
5.6.280.0030.06720.91
5.6.210.0100.04020.54
5.6.200.0100.07718.25
5.6.190.0100.08320.39
5.6.180.0400.05020.50
5.6.170.0230.05020.55
5.6.160.0070.07020.71
5.6.150.0030.08718.16
5.6.140.0030.06718.15
5.6.130.0030.08318.12
5.6.120.0130.06321.00
5.6.110.0130.06021.03
5.6.100.0200.07020.98
5.6.90.0200.03721.02
5.6.80.0100.06320.50
5.5.350.0130.08320.44
5.5.340.0000.04317.98
5.5.330.0130.07720.37
5.5.320.0470.03020.35
5.5.310.0170.05720.41
5.5.300.0100.06018.06
5.5.290.0070.08017.95
5.5.280.0030.08320.87
5.5.270.0130.07720.75
5.5.260.0070.07020.76
5.5.250.0170.06320.70
5.5.240.0230.06020.27

preferences:
31.98 ms | 401 KiB | 5 Q