3v4l.org

run code in 300+ PHP versions simultaneously
<?php $factor=6; for($x=0; $x<10; ++$x){ // battery of 10 tests $number=rand(0,100); echo "Number: $number Becomes: "; if($remainder=$number%$factor){ // if not zero $number+=$factor-$remainder; // use cached $remainder instead of calculating again } echo "$number\n"; }

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.0.30.0080.00517.25
8.0.20.0310.00416.99
8.0.10.0290.00616.94
8.0.00.0270.00917.05
7.4.160.0170.01216.55
7.4.150.0240.00516.53
7.4.140.0180.01416.47
7.4.130.0150.01516.41
7.4.120.0250.01016.39
7.4.110.0240.00616.51
7.4.100.0350.00016.45
7.4.90.0190.01616.48
7.4.80.0200.00816.37
7.4.70.0140.01916.33
7.4.60.0320.00016.54
7.4.50.0250.00716.56
7.4.40.0230.01216.29
7.4.30.0160.01616.51
7.4.20.0240.00416.56
7.4.10.0190.00515.85
7.4.00.0130.00915.90
7.3.270.0180.01516.52
7.3.260.0140.01916.30
7.3.250.0190.00916.28
7.3.240.0230.01216.34
7.3.230.0220.00516.55
7.3.220.0250.00716.50
7.3.210.0210.01216.28
7.3.200.0240.00816.60
7.3.190.0280.00516.26
7.3.180.0270.00616.25
7.3.170.0210.01116.51
7.3.160.0200.01316.52
7.3.150.0290.00616.58
7.3.140.0140.01916.27
7.3.130.0150.00715.71
7.3.120.0170.01015.73
7.3.110.0160.00915.62
7.3.100.0100.01015.67
7.3.90.0110.01115.80
7.3.80.0140.00815.79
7.3.70.0100.01215.61
7.3.60.0110.00915.75
7.3.50.0130.00815.66
7.3.40.0120.01115.76
7.3.30.0120.01015.78
7.3.20.0110.01016.49
7.3.10.0110.01016.42
7.3.00.0120.00816.39
7.2.340.0150.01516.43
7.2.330.0250.00716.70
7.2.320.0260.00616.68
7.2.310.0220.00616.37
7.2.300.0230.01116.42
7.2.290.0220.01116.73
7.2.280.0230.00916.46
7.2.270.0180.01416.49
7.2.260.0140.00716.10
7.2.250.0130.01215.96
7.2.240.0130.00916.08
7.2.230.0130.00815.88
7.2.220.0150.00815.93
7.2.210.0090.01115.71
7.2.200.0090.01315.95
7.2.190.0130.00815.93
7.2.180.0120.01116.03
7.2.170.0080.01115.92
7.2.160.0140.00916.07
7.2.150.0150.00816.71
7.2.140.0110.01016.67
7.2.130.0140.00416.70
7.2.120.0140.00616.62
7.2.110.0120.01016.59
7.2.100.0150.00616.64
7.2.90.0110.00916.72
7.2.80.0120.00716.67
7.2.70.0100.01216.74
7.2.60.0110.01016.63
7.2.50.0140.00916.72
7.2.40.0120.01216.67
7.2.30.0290.01016.74
7.2.20.0140.01016.73
7.2.10.0170.00916.94
7.2.00.0150.01016.99
7.1.330.0160.00915.58
7.1.320.0090.01115.63
7.1.310.0130.00715.65
7.1.300.0110.00815.58
7.1.290.0120.01015.63
7.1.280.0100.01315.62
7.1.270.0150.00315.52
7.1.260.0100.01015.59
7.1.250.0150.00615.60
7.1.240.0120.00715.58
7.1.230.0120.00615.67
7.1.220.0150.00615.54
7.1.210.0150.00615.60
7.1.200.0140.00715.59
7.1.190.0150.00615.59
7.1.180.0120.00915.57
7.1.170.0120.00715.63
7.1.160.0080.01315.55
7.1.150.0100.01115.57
7.1.140.0090.00915.58
7.1.130.0170.00915.78
7.1.120.0130.01315.79
7.1.110.0170.00915.73
7.1.100.0290.00815.76
7.1.90.0160.00915.63
7.1.80.0140.01115.65
7.1.70.0130.01015.56
7.1.60.0190.00719.08
7.1.50.0200.00618.99
7.1.40.0280.00419.06
7.1.30.0190.01018.95
7.1.20.0180.00818.88
7.1.10.0210.00915.32
7.1.00.0100.01015.44
7.0.330.0110.00915.21
7.0.320.0090.00815.22
7.0.310.0170.00415.36
7.0.300.0140.00715.31
7.0.290.0160.00515.35
7.0.280.0140.00615.18
7.0.270.0170.00515.50
7.0.260.0140.01215.46
7.0.250.0190.00815.44
7.0.240.0160.01015.50
7.0.230.0160.00715.31
7.0.220.0250.00815.49
7.0.210.0170.00815.24
7.0.200.0130.01115.19
7.0.190.0170.00915.28
7.0.180.0160.00815.11
7.0.170.0160.00815.14
7.0.160.0160.00715.08
7.0.150.0150.00815.15
7.0.140.0240.01015.15
7.0.130.0160.00815.12
7.0.120.0110.01215.16
7.0.110.0170.00715.08
7.0.100.0150.00815.04
7.0.90.0170.00715.07
7.0.80.0180.00815.01
7.0.70.0190.00815.09
7.0.60.0140.01015.18
7.0.50.0200.00815.14
7.0.40.0200.00814.73
7.0.30.0190.00714.72
7.0.20.0180.00714.66
7.0.10.0180.00614.77
7.0.00.0190.00614.70
5.6.400.0120.01215.53
5.6.390.0150.00915.47
5.6.380.0150.00415.17
5.6.370.0130.00915.27
5.6.360.0120.01015.16
5.6.350.0140.00915.18
5.6.340.0110.00815.31
5.6.330.0140.00815.28
5.6.320.0090.01215.20
5.6.310.0110.01015.04
5.6.300.0100.02016.31
5.6.290.0140.01516.23
5.6.280.0140.01716.24
5.6.270.0120.01816.27
5.6.260.0100.02116.40
5.6.250.0120.02016.25
5.6.240.0120.01916.33
5.6.230.0110.02216.18
5.6.220.0090.02116.16
5.6.210.0140.01816.31
5.6.200.0150.01816.23
5.6.190.0140.01816.21
5.6.180.0130.01516.29
5.6.170.0150.01816.27
5.6.160.0130.01816.26
5.6.150.0130.02316.19
5.6.140.0150.02116.29
5.6.130.0080.02316.22
5.6.120.0150.01816.26
5.6.110.0120.02016.18
5.6.100.0150.01716.11
5.6.90.0140.01616.22
5.6.80.0150.01715.98
5.6.70.0110.02216.03
5.6.60.0150.01716.10
5.6.50.0150.01816.05
5.6.40.0100.02316.10
5.6.30.0160.01816.02
5.6.20.0140.01716.00
5.6.10.0160.01716.03
5.6.00.0120.02216.01
5.5.380.0160.00914.60
5.5.370.0140.01014.53
5.5.360.0180.00614.62
5.5.350.0180.00514.72
5.5.340.0170.01014.68
5.5.330.0090.01614.62
5.5.320.0170.00714.57
5.5.310.0190.00614.54
5.5.300.0150.00814.75
5.5.290.0180.00514.63
5.5.280.0140.00914.50
5.5.270.0110.01514.55
5.5.260.0120.01114.54
5.5.250.0170.00814.57
5.5.240.0100.01214.59
5.5.230.0120.00814.63
5.5.220.0170.00514.47
5.5.210.0090.01314.53
5.5.200.0160.00814.65
5.5.190.0170.00914.58
5.5.180.0160.00614.43
5.5.170.0150.01115.25
5.5.160.0140.00814.61
5.5.150.0120.01114.51
5.5.140.0150.00814.54
5.5.130.0160.00814.47
5.5.120.0180.00714.67
5.5.110.0200.00514.34
5.5.100.0130.01114.52
5.5.90.0170.00914.68
5.5.80.0140.00814.55
5.5.70.0150.00914.56
5.5.60.0160.01014.55
5.5.50.0100.01014.68
5.5.40.0090.01114.42
5.5.30.0160.00614.48
5.5.20.0100.01314.55
5.5.10.0160.00714.45
5.5.00.0180.00814.46
5.4.450.0120.00612.45
5.4.440.0110.00812.46
5.4.430.0100.00812.46
5.4.420.0120.00712.38
5.4.410.0140.00512.34
5.4.400.0120.00612.39
5.4.390.0110.00712.47
5.4.380.0130.00712.43
5.4.370.0160.00312.45
5.4.360.0110.00612.39
5.4.350.0130.00812.46
5.4.340.0130.00712.35
5.4.330.0140.00712.39
5.4.320.0140.00512.39
5.4.310.0130.00712.37
5.4.300.0160.00212.40
5.4.290.0070.00912.33
5.4.280.0150.00512.29
5.4.270.0120.00712.41
5.4.260.0090.01012.40
5.4.250.0150.00312.31
5.4.240.0110.00912.44
5.4.230.0120.00612.31
5.4.220.0120.00612.47
5.4.210.0100.01012.42
5.4.200.0100.00912.36
5.4.190.0160.00612.40
5.4.180.0120.00812.46
5.4.170.0160.00812.30
5.4.160.0090.01012.37
5.4.150.0110.00812.36
5.4.140.0150.00512.31
5.4.130.0090.00812.43
5.4.120.0130.00512.44
5.4.110.0100.00812.47
5.4.100.0170.00212.37
5.4.90.0120.00712.48
5.4.80.0100.01012.37
5.4.70.0100.00812.31
5.4.60.0090.00812.34
5.4.50.0140.00412.43
5.4.40.0120.00612.38
5.4.30.0140.00512.47
5.4.20.0130.00512.48
5.4.10.0100.00812.41
5.4.00.0120.00712.40
5.3.290.0080.00912.77
5.3.280.0110.00612.62
5.3.270.0110.00912.78
5.3.260.0100.00812.75
5.3.250.0110.01012.67
5.3.240.0120.01012.61
5.3.230.0100.00712.73
5.3.220.0140.00812.59
5.3.210.0150.00312.58
5.3.200.0120.00812.58
5.3.190.0140.00512.67
5.3.180.0160.00312.68
5.3.170.0120.00612.64
5.3.160.0130.00712.67
5.3.150.0130.00612.67
5.3.140.0120.00812.66
5.3.130.0130.00712.78
5.3.120.0150.00612.75
5.3.110.0090.01112.67
5.3.100.0110.00712.72
5.3.90.0120.00712.67
5.3.80.0140.00312.58
5.3.70.0090.00812.50
5.3.60.0100.00712.65
5.3.50.0130.00612.54
5.3.40.0060.01112.52
5.3.30.0080.01112.55
5.3.20.0120.00712.57
5.3.10.0160.00512.48
5.3.00.0120.00712.38
5.2.170.0130.00712.00
5.2.160.0120.00512.02
5.2.150.0110.00412.08
5.2.140.0120.00211.95
5.2.130.0100.00711.93
5.2.120.0070.00811.96
5.2.110.0120.00212.02
5.2.100.0060.01211.95
5.2.90.0110.00511.95
5.2.80.0110.00412.00
5.2.70.0100.00811.93
5.2.60.0100.00511.98
5.2.50.0090.00711.93
5.2.40.0110.00511.93
5.2.30.0110.00311.93
5.2.20.0090.00611.93
5.2.10.0110.00811.93
5.2.00.0070.00911.93
5.1.60.0120.00311.93
5.1.50.0070.01011.93
5.1.40.0090.00511.93
5.1.30.0080.00711.93
5.1.20.0070.00711.93
5.1.10.0080.00611.93
5.1.00.0120.00211.93
5.0.50.0070.00611.93
5.0.40.0060.00711.93
5.0.30.0080.00411.93
5.0.20.0090.00211.93
5.0.10.0070.00511.93
5.0.00.0100.00311.93
4.4.90.0060.00211.93
4.4.80.0050.00311.93
4.4.70.0070.00211.93
4.4.60.0050.00311.93
4.4.50.0070.00311.93
4.4.40.0050.00411.93
4.4.30.0060.00311.93
4.4.20.0040.00511.93
4.4.10.0070.00111.93
4.4.00.0050.00311.93
4.3.110.0060.00111.93
4.3.100.0010.00811.93
4.3.90.0040.00411.93
4.3.80.0040.00511.93
4.3.70.0060.00311.93
4.3.60.0050.00411.93
4.3.50.0030.00511.93
4.3.40.0060.00311.93
4.3.30.0040.00311.93
4.3.20.0050.00111.93
4.3.10.0030.00411.93
4.3.00.0060.00111.93

preferences:
30.14 ms | 403 KiB | 5 Q