3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = [54,23,2,56,7,2,300]; for ($j = 0, $count = count($str); $j < $count; $j++) { for ($i = $j + 1; $i < $count; $i++) { //if ($str[$i] > $str[$j]) { // list($str[$i], $str[$j]) = [$str[$j], $str[$i]]; //} if ($str[$i] < $str[$j]) { list($str[$i], $str[$j]) = [$str[$j], $str[$i]]; } } } print_r($str);
based on XrBNB

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.0beta10.0090.00916.63
8.0.0alpha30.0070.01016.71
8.0.0alpha20.0030.01616.56
8.0.0alpha10.0070.01016.52
7.4.90.0100.00616.56
7.4.80.0030.01319.39
7.4.70.0100.00716.44
7.4.60.0090.01216.31
7.4.50.0070.00516.47
7.4.40.0150.00716.29
7.4.30.0100.01116.20
7.4.20.0120.00916.30
7.4.10.0130.00816.15
7.4.00.0100.00616.28
7.3.210.0110.00716.40
7.3.200.0130.00316.65
7.3.190.0100.00616.35
7.3.180.0180.00316.41
7.3.170.0100.00716.59
7.3.160.0120.00716.23
7.3.150.0080.01416.53
7.3.140.0120.00816.22
7.3.130.0130.00616.15
7.3.120.0110.00816.23
7.3.110.0130.00816.25
7.3.100.0170.00216.36
7.3.90.0140.00816.22
7.3.80.0130.00716.30
7.3.70.0150.00416.25
7.3.60.0120.00816.34
7.3.50.0080.01216.28
7.3.40.0110.00816.23
7.3.30.0150.00416.08
7.3.20.0140.00716.18
7.3.10.0110.01016.14
7.3.00.0130.00716.28
7.2.330.0140.00316.79
7.2.320.0110.00516.48
7.2.310.0120.00616.73
7.2.300.0080.00816.73
7.2.290.0120.01016.40
7.2.280.0130.00816.33
7.2.270.0080.01216.40
7.2.260.0130.00716.50
7.2.250.0130.00716.51
7.2.240.0120.00916.37
7.2.230.0130.00916.52
7.2.220.0120.01016.65
7.2.210.0130.00816.62
7.2.200.0150.00616.47
7.2.190.0110.00816.43
7.2.180.0130.00716.54
7.2.170.0110.01116.43
7.2.160.0120.00816.40
7.2.150.0140.00916.23
7.2.140.0160.00716.44
7.2.130.0090.01316.50
7.2.120.0130.00716.47
7.2.110.0100.01116.34
7.2.100.0100.01216.53
7.2.90.0190.00916.39
7.2.80.0090.01416.57
7.2.70.0110.01116.57
7.2.60.0190.00616.48
7.2.50.0100.01016.39
7.2.40.0130.01016.46
7.2.30.0180.01016.45
7.2.20.0100.01116.33
7.2.10.0170.00416.39
7.2.00.0120.00916.47
7.1.330.0170.00915.46
7.1.320.0240.00415.57
7.1.310.0280.00015.59
7.1.300.0260.00315.45
7.1.290.0170.01415.64
7.1.280.0230.01215.49
7.1.270.0260.00415.56
7.1.260.0240.00715.34
7.1.250.0160.01615.49
7.1.240.0220.00615.53
7.1.230.0310.00015.48
7.1.220.0210.01015.56
7.1.210.0210.01515.45
7.1.200.0320.01115.50
7.1.190.0390.01215.55
7.1.180.0290.00515.59
7.1.170.0290.00815.52
7.1.160.0310.01415.56
7.1.150.0270.01015.34
7.1.140.0280.01115.58
7.1.130.0290.01115.36
7.1.120.0280.00515.54
7.1.110.0140.01715.48
7.1.100.0260.00915.55
7.1.90.0250.00315.48
7.1.80.0170.01415.47
7.1.70.0320.00415.53
7.1.60.0150.01315.54
7.1.50.0110.01415.54
7.1.40.0220.01015.45
7.1.30.0250.00315.53
7.1.20.0230.00315.38
7.1.10.0160.01315.43
7.1.00.0250.00915.52
7.0.330.0250.00315.23
7.0.320.0240.00815.15
7.0.310.0340.01015.28
7.0.300.0220.00915.00
7.0.290.0190.00614.90
7.0.280.0190.01115.04
7.0.270.0210.01114.92
7.0.260.0160.01215.03
7.0.250.0210.00915.25
7.0.240.0120.01415.11
7.0.230.0210.00615.12
7.0.220.0200.01014.91
7.0.210.0380.01615.07
7.0.200.0180.00915.20
7.0.190.0210.00415.21
7.0.180.0230.00315.06
7.0.170.0190.00915.23
7.0.160.0210.00714.95
7.0.150.0210.00615.13
7.0.140.0230.01215.13
7.0.130.0140.00915.16
7.0.120.0190.00715.08
7.0.110.0280.00615.36
7.0.100.0220.00815.16
7.0.90.0130.01315.09
7.0.80.0050.02015.25
7.0.70.0450.00515.19
7.0.60.0290.00015.30
7.0.50.0280.00715.05
7.0.40.0150.00915.04
7.0.30.0130.01315.09
7.0.20.0260.00715.12
7.0.10.0210.00614.94
7.0.00.0150.00814.97
5.6.400.0120.01215.80
5.6.390.0120.01215.77
5.6.380.0210.00915.92
5.6.370.0180.01515.69
5.6.360.0170.01815.94
5.6.350.0230.00816.04
5.6.340.0120.01615.43
5.6.330.0240.00915.64
5.6.320.0270.00316.00
5.6.310.0190.00815.76
5.6.300.0230.00815.72
5.6.290.0190.01415.59
5.6.280.0190.01415.84
5.6.270.0160.01215.84
5.6.260.0160.01615.90
5.6.250.0250.00816.00
5.6.240.0180.01315.85
5.6.230.0170.01715.73
5.6.220.0150.01316.05
5.6.210.0130.01715.86
5.6.200.0220.00615.76
5.6.190.0180.00915.96
5.6.180.0220.01215.95
5.6.170.0230.00715.91
5.6.160.0150.01615.82
5.6.150.0150.01515.82
5.6.140.0120.01515.91
5.6.130.0170.00615.73
5.6.120.0150.01515.79
5.6.110.0180.00915.67
5.6.100.0180.01516.17
5.6.90.0120.01315.89
5.6.80.0160.01715.84
5.6.70.0180.01415.77
5.6.60.0090.02115.70
5.6.50.0230.00715.80
5.6.40.0110.02315.70
5.6.30.0160.01415.96
5.6.20.0180.01415.95
5.6.10.0220.00915.91
5.6.00.0210.01215.71
5.5.380.0280.00816.07
5.5.370.0280.00415.87
5.5.360.0290.00015.96
5.5.350.0240.00915.82
5.5.340.0220.00915.73
5.5.330.0140.01716.10
5.5.320.0300.00715.77
5.5.310.0540.02415.69
5.5.300.0200.01015.96
5.5.290.0180.01615.93
5.5.280.0170.01415.97
5.5.270.0310.00615.70
5.5.260.0230.00916.00
5.5.250.0330.00915.77
5.5.240.0200.01615.69
5.5.230.0260.00915.84
5.5.220.0240.00815.97
5.5.210.0240.01015.80
5.5.200.0200.01216.00
5.5.190.0170.01816.09
5.5.180.0210.02115.89
5.5.170.0220.01615.61
5.5.160.0210.01315.82
5.5.150.0230.01015.86
5.5.140.0210.01115.97
5.5.130.0230.01115.87
5.5.120.0290.00915.66
5.5.110.0220.01615.94
5.5.100.0230.01715.95
5.5.90.0240.01215.76
5.5.80.0170.01715.88
5.5.70.0200.01315.90
5.5.60.0300.00015.73
5.5.50.0230.01215.91
5.5.40.0290.00315.98
5.5.30.0210.01115.86
5.5.20.0210.00915.91
5.5.10.0190.01215.55
5.5.00.0310.00615.76
5.4.450.0150.00812.70
5.4.440.0170.00912.74
5.4.430.0150.01112.73
5.4.420.0190.00512.81
5.4.410.0250.00512.76
5.4.400.0240.00312.84
5.4.390.0120.01612.66
5.4.380.0180.00812.65
5.4.370.0250.00612.71
5.4.360.0200.00912.81
5.4.350.0130.01312.74
5.4.340.0220.00512.83
5.4.330.0240.00312.65
5.4.320.0160.00812.75
5.4.310.0080.01612.69
5.4.300.0190.00612.66
5.4.290.0150.00912.66
5.4.280.0150.01212.75
5.4.270.0180.01112.77
5.4.260.0240.00812.52
5.4.250.0230.00512.49
5.4.240.0170.01012.81
5.4.230.0070.01812.72
5.4.220.0080.01612.38
5.4.210.0170.01012.68
5.4.200.0280.00512.68
5.4.190.0140.01012.72
5.4.180.0150.01512.86
5.4.170.0180.00612.55
5.4.160.0180.00512.57
5.4.150.0190.00412.61
5.4.140.0160.01312.59
5.4.130.0140.00912.79
5.4.120.0110.01112.64
5.4.110.0150.00812.62
5.4.100.0250.00012.71
5.4.90.0110.01112.58
5.4.80.0190.01112.81
5.4.70.0130.01612.63
5.4.60.0160.00812.80
5.4.50.0130.01312.78
5.4.40.0140.01112.87
5.4.30.0260.00012.77
5.4.20.0180.00812.77
5.4.10.0210.00312.64
5.4.00.0130.01312.79
5.3.290.0150.00312.96
5.3.280.0140.01012.51
5.3.270.0190.00812.66
5.3.260.0200.00412.75
5.3.250.0160.00712.59
5.3.240.0130.00912.46
5.3.230.0140.00912.53
5.3.220.0200.00412.50
5.3.210.0100.01012.57
5.3.200.0140.00712.73
5.3.190.0140.01512.90
5.3.180.0090.01512.72
5.3.170.0160.00812.91
5.3.160.0090.01412.70
5.3.150.0100.01112.90
5.3.140.0200.00312.73
5.3.130.0120.01612.95
5.3.120.0170.01212.76
5.3.110.0170.00612.85
5.3.100.0110.01112.63
5.3.90.0110.01112.68
5.3.80.0090.01312.73
5.3.70.0180.00812.61
5.3.60.0160.00812.84
5.3.50.0160.00612.88
5.3.40.0150.01012.65
5.3.30.0150.00812.55
5.3.20.0110.01412.72
5.3.10.0150.00612.35
5.3.00.0100.01012.39
5.2.170.0060.01811.73
5.2.160.0070.01111.98
5.2.150.0120.01311.77
5.2.140.0040.01611.71
5.2.130.0150.00611.76
5.2.120.0110.00711.71
5.2.110.0040.01411.76
5.2.100.0110.00711.71
5.2.90.0150.00411.71
5.2.80.0140.00811.82
5.2.70.0150.00911.71
5.2.60.0100.01011.71
5.2.50.0170.00011.88
5.2.40.0070.01011.71
5.2.30.0160.00311.71
5.2.20.0100.01111.71
5.2.10.0090.00911.71
5.2.00.0130.00311.71
5.1.60.0080.00611.71
5.1.50.0100.00911.71
5.1.40.0060.01311.71
5.1.30.0100.01011.71
5.1.20.0110.00711.71
5.1.10.0070.01011.71
5.1.00.0030.01311.71
5.0.50.0100.00611.71
5.0.40.0110.00411.71
5.0.30.0110.00411.71
5.0.20.0090.00611.71
5.0.10.0070.00711.71
5.0.00.0100.00711.71
4.4.90.0120.00011.71
4.4.80.0040.00511.71
4.4.70.0060.00311.71
4.4.60.0030.00711.71
4.4.50.0100.00011.71
4.4.40.0040.00411.71
4.4.30.0070.00211.71
4.4.20.0100.00011.71
4.4.10.0090.00011.71
4.4.00.0080.00311.71
4.3.110.0080.00011.71
4.3.100.0050.00511.71
4.3.90.0080.00011.71
4.3.80.0050.00511.71
4.3.70.0050.00211.71
4.3.60.0080.00411.71
4.3.50.0050.00511.71
4.3.40.0060.00411.71
4.3.30.0040.00411.71
4.3.20.0060.00211.71
4.3.10.0080.00011.71
4.3.00.0110.00011.71