3v4l.org

run code in 300+ PHP versions simultaneously
<?php $new_array = array( "8000", "12345", "6811-1", "7031", "6841" ); var_dump(max($new_array)); // would expect 8000, but returns 7031 sort($new_array); var_dump($new_array); // the sorted array is wonky... why isn't 8000 at the end?

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.120.0080.00019.07
8.3.110.0160.00316.47
8.3.100.0000.01424.06
8.3.90.0040.00426.77
8.3.80.0030.00617.97
8.3.70.0100.01018.43
8.3.60.0110.00416.63
8.3.50.0140.00521.91
8.3.40.0070.00718.64
8.3.30.0110.00418.52
8.3.20.0050.00320.59
8.3.10.0000.00821.79
8.3.00.0080.00020.53
8.2.240.0030.00616.97
8.2.230.0090.00620.94
8.2.220.0090.00037.54
8.2.210.0060.00326.77
8.2.200.0030.00618.29
8.2.190.0070.00716.60
8.2.180.0040.01118.17
8.2.170.0110.00422.96
8.2.160.0090.00919.17
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00722.21
8.2.120.0040.00426.35
8.2.110.0040.01420.56
8.2.100.0090.00317.72
8.2.90.0060.00319.15
8.2.80.0000.00817.97
8.2.70.0090.00017.50
8.2.60.0080.00017.93
8.2.50.0070.00018.10
8.2.40.0060.00322.31
8.2.30.0040.00419.15
8.2.20.0000.00817.53
8.2.10.0000.00718.09
8.2.00.0040.00317.85
8.1.300.0060.00317.82
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0070.00023.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00320.88
8.1.230.0060.00617.42
8.1.220.0040.00417.74
8.1.210.0050.00518.77
8.1.200.0030.00617.35
8.1.190.0050.00517.11
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0040.00422.12
8.1.150.0080.00018.77
8.1.140.0000.00719.41
8.1.130.0030.00317.42
8.1.120.0000.00717.30
8.1.110.0040.00417.38
8.1.100.0080.00017.36
8.1.90.0080.00017.36
8.1.80.0030.00617.38
8.1.70.0000.00717.21
8.1.60.0000.00917.50
8.1.50.0040.00417.40
8.1.40.0000.00717.49
8.1.30.0090.00317.63
8.1.20.0050.00317.41
8.1.10.0110.00017.49
8.1.00.0040.00717.44
8.0.300.0070.00018.77
8.0.290.0040.00416.58
8.0.280.0030.00318.29
8.0.270.0040.00417.14
8.0.260.0030.00316.59
8.0.250.0030.00416.80
8.0.240.0040.00416.92
8.0.230.0070.00016.94
8.0.220.0070.00016.77
8.0.210.0030.00316.74
8.0.200.0040.00416.94
8.0.190.0000.00816.93
8.0.180.0000.00716.88
8.0.170.0000.00716.77
8.0.160.0040.00416.86
8.0.150.0000.00816.72
8.0.140.0030.00316.71
8.0.130.0050.00013.28
8.0.120.0030.00516.65
8.0.110.0080.00016.70
8.0.100.0040.00416.60
8.0.90.0070.00016.80
8.0.80.0030.01216.81
8.0.70.0030.00516.68
8.0.60.0070.00016.67
8.0.50.0000.00816.70
8.0.30.0090.00917.00
8.0.20.0100.00817.40
8.0.10.0030.00516.97
8.0.00.0150.00316.56
7.4.330.0000.00515.08
7.4.320.0030.00316.45
7.4.300.0060.00016.41
7.4.290.0030.00316.46
7.4.280.0120.00016.42
7.4.270.0000.00716.45
7.4.260.0000.00716.42
7.4.250.0050.00216.47
7.4.240.0080.00016.45
7.4.230.0000.00716.42
7.4.220.0090.00616.36
7.4.210.0110.00416.37
7.4.200.0000.00716.53
7.4.160.0080.00816.26
7.4.150.0160.00917.40
7.4.140.0110.00917.86
7.4.130.0070.01116.44
7.4.120.0110.00816.27
7.4.110.0080.00816.45
7.4.100.0140.01016.59
7.4.90.0100.00716.48
7.4.80.0090.00919.39
7.4.70.0080.00816.14
7.4.60.0100.00716.22
7.4.50.0050.00816.18
7.4.40.0190.00416.35
7.4.30.0070.01616.58
7.4.10.0090.00615.07
7.4.00.0070.01014.78
7.3.330.0030.00313.03
7.3.320.0060.00013.03
7.3.310.0030.00316.20
7.3.300.0070.00016.04
7.3.290.0030.01316.11
7.3.280.0080.00816.07
7.3.270.0070.01017.40
7.3.260.0100.00816.32
7.3.250.0070.01216.18
7.3.240.0080.01116.27
7.3.230.0030.01316.39
7.3.210.0070.01116.19
7.3.200.0100.01016.14
7.3.190.0080.01116.11
7.3.180.0110.00716.13
7.3.170.0060.01216.30
7.3.160.0100.00616.26
7.3.130.0120.00315.07
7.3.120.0070.01015.07
7.3.110.0040.01215.07
7.3.100.0060.00615.07
7.3.90.0040.01215.07
7.3.80.0060.00915.07
7.3.70.0100.00315.07
7.3.60.0100.00315.07
7.3.50.0030.00915.07
7.3.40.0080.00015.07
7.3.30.0090.00315.07
7.3.20.0090.00316.65
7.3.10.0030.00916.39
7.3.00.0070.00716.60
7.2.330.0030.01516.23
7.2.320.0120.00916.44
7.2.310.0060.01016.21
7.2.300.0060.01116.57
7.2.290.0100.00916.29
7.2.260.0030.01315.07
7.2.250.0000.01715.07
7.2.240.0070.00715.07
7.2.230.0040.01215.07
7.2.220.0000.01615.07
7.2.210.0070.00715.07
7.2.200.0100.00615.07
7.2.190.0030.00915.07
7.2.180.0060.00615.07
7.2.170.0060.00615.07
7.2.160.0060.00915.07
7.2.150.0030.01016.42
7.2.140.0060.00316.46
7.2.130.0110.00416.51
7.2.120.0060.00316.68
7.2.110.0060.00916.84
7.2.100.0040.01116.75
7.2.90.0080.00616.43
7.2.80.0070.00716.41
7.2.70.0100.00716.74
7.2.60.0060.01016.81
7.2.50.0130.00016.50
7.2.40.0070.00716.79
7.2.30.0130.00016.89
7.2.20.0070.00716.54
7.2.10.0030.00616.78
7.2.00.0050.00817.94
7.1.330.0090.00615.61
7.1.320.0060.00615.84
7.1.310.0070.00715.74
7.1.300.0090.00615.38
7.1.290.0070.00715.42
7.1.280.0070.00315.52
7.1.270.0040.00415.73
7.1.260.0040.00715.88
7.1.250.0060.00915.85
7.1.240.0040.01115.57
7.1.230.0090.00015.84
7.1.220.0000.01215.50
7.1.210.0030.01015.77
7.1.200.0070.00415.69
7.1.190.0030.01015.57
7.1.180.0040.00815.73
7.1.170.0090.00415.50
7.1.160.0090.00615.75
7.1.150.0030.00615.56
7.1.140.0030.01015.81
7.1.130.0090.00615.62
7.1.120.0040.00815.60
7.1.110.0030.00615.69
7.1.100.0040.00916.87
7.1.90.0070.00715.76
7.1.80.0100.00315.55
7.1.70.0060.00616.42
7.1.60.0070.00617.77
7.1.50.0050.01116.05
7.1.40.0070.00715.77
7.1.30.0000.01615.82
7.1.20.0030.01315.66
7.1.10.0070.01015.85
7.1.00.0030.04219.10
7.0.330.0100.00315.25
7.0.320.0060.00915.32
7.0.310.0070.00715.30
7.0.300.0090.00015.54
7.0.290.0090.00015.18
7.0.280.0060.00615.07
7.0.270.0000.01315.34
7.0.260.0040.00715.28
7.0.250.0090.00315.39
7.0.240.0000.01315.10
7.0.230.0000.00915.54
7.0.220.0030.01015.13
7.0.210.0030.00615.53
7.0.200.0040.00516.05
7.0.190.0030.00615.09
7.0.180.0100.00515.30
7.0.170.0030.01315.30
7.0.160.0040.01115.34
7.0.150.0000.01015.32
7.0.140.0030.01015.34
7.0.130.0030.01015.30
7.0.120.0030.01315.26
7.0.110.0070.00715.44
7.0.100.0240.03617.71
7.0.90.0180.03017.69
7.0.80.0110.04217.61
7.0.70.0240.02617.70
7.0.60.0080.04217.66
7.0.50.0080.03717.90
7.0.40.0040.03217.59
7.0.30.0050.04017.56
7.0.20.0110.04117.62
7.0.10.0090.03317.54
7.0.00.0100.02517.55
5.6.400.0030.00615.07
5.6.390.0040.00415.07
5.6.380.0070.01015.07
5.6.370.0030.01015.07
5.6.360.0030.01315.07
5.6.350.0070.00715.07
5.6.340.0060.00915.07
5.6.330.0030.01015.07
5.6.320.0030.01015.07
5.6.310.0060.00315.07
5.6.300.0000.01015.07
5.6.290.0000.01715.07
5.6.280.0070.00415.07
5.6.270.0060.00915.07
5.6.260.0040.00815.07
5.6.250.0050.04517.83
5.6.240.0120.03017.88
5.6.230.0040.04517.84
5.6.220.0060.03817.88
5.6.210.0060.04117.83
5.6.200.0100.04018.07
5.6.190.0120.02718.08
5.6.180.0100.04718.05
5.6.170.0060.02318.04
5.6.160.0050.04618.04
5.6.150.0120.03818.00
5.6.140.0050.03218.00
5.6.130.0060.03918.08
5.6.120.0030.04618.04
5.6.110.0040.04418.09
5.6.100.0000.03418.05
5.6.90.0110.02618.10
5.6.80.0100.03417.75
5.6.70.0110.03817.79
5.6.60.0070.02417.74
5.6.50.0060.02417.73
5.6.40.0030.04517.74
5.6.30.0070.02817.68
5.6.20.0120.03017.73
5.6.10.0090.03717.71
5.6.00.0050.04317.73
5.5.380.0170.06720.49
5.5.370.0170.07720.35
5.5.360.0100.08320.35
5.5.350.0100.06020.43
5.5.340.0030.07320.89
5.5.330.0130.06720.83
5.5.320.0200.04020.80
5.5.310.0130.08320.78
5.5.300.0000.04720.79
5.5.290.0170.06320.88
5.5.280.0030.05320.81
5.5.270.0100.05720.77
5.5.260.0070.07720.75
5.5.250.0000.08020.61
5.5.240.0030.04720.11
5.5.230.0030.05320.30
5.5.220.0130.06720.24
5.5.210.0070.06720.20
5.5.200.0100.04020.22
5.5.190.0170.05720.26
5.5.180.0030.08720.14
5.5.160.0130.07020.20
5.5.150.0100.06720.16
5.5.140.0030.07720.23
5.5.130.0100.08020.16
5.5.120.0100.07020.14
5.5.110.0100.07320.23
5.5.100.0070.04720.09
5.5.90.0030.07720.10
5.5.80.0100.06320.08
5.5.70.0000.04320.13
5.5.60.0100.07720.04
5.5.50.0070.07020.09
5.5.40.0130.03320.10
5.5.30.0100.07720.04
5.5.20.0170.03720.07
5.5.10.0100.05720.04
5.5.00.0170.06720.07
5.4.450.0170.07019.30
5.4.440.0030.06019.23
5.4.430.0030.05719.38
5.4.420.0000.08019.42
5.4.410.0100.07719.16
5.4.400.0030.04019.03
5.4.390.0000.08019.10
5.4.380.0070.08018.98
5.4.370.0070.08019.13
5.4.360.0100.04019.10
5.4.350.0100.07018.94
5.4.340.0130.07019.13
5.4.320.0000.04319.06
5.4.310.0070.07318.95
5.4.300.0070.04718.82
5.4.290.0100.06319.12
5.4.280.0070.03719.04
5.4.270.0100.06319.03
5.4.260.0200.05718.94
5.4.250.0130.06319.02
5.4.240.0000.05018.94
5.4.230.0070.05718.97
5.4.220.0100.06719.22
5.4.210.0070.06719.24
5.4.200.0030.07718.95
5.4.190.0070.07318.96
5.4.180.0030.07019.21
5.4.170.0000.04718.95
5.4.160.0030.04718.86
5.4.150.0030.04719.12
5.4.140.0170.04016.35
5.4.130.0130.04016.36
5.4.120.0070.06316.36
5.4.110.0130.03316.33
5.4.100.0070.05716.44
5.4.90.0100.07316.21
5.4.80.0000.07716.41
5.4.70.0030.06016.25
5.4.60.0100.09316.39
5.4.50.0030.05716.31
5.4.40.0030.06316.34
5.4.30.0130.05316.20
5.4.20.0000.06716.28
5.4.10.0100.06716.39
5.4.00.0070.04715.56
5.3.290.0030.05014.64
5.3.280.0030.08314.60
5.3.270.0030.04314.56
5.3.260.0130.03714.61
5.3.250.0000.07314.61
5.3.240.0100.06314.56
5.3.230.0030.07314.50
5.3.220.0130.04714.57
5.3.210.0030.04314.55
5.3.200.0030.06714.51
5.3.190.0070.04014.42
5.3.180.0130.03714.54
5.3.170.0100.07714.56
5.3.160.0100.04014.50
5.3.150.0030.04014.50
5.3.140.0000.07714.54
5.3.130.0030.06714.38
5.3.120.0070.03314.52
5.3.110.0070.08014.38
5.3.100.0100.06714.01
5.3.90.0100.06713.98
5.3.80.0130.06714.00
5.3.70.0100.06313.96
5.3.60.0070.07313.96
5.3.50.0030.04013.93
5.3.40.0070.07313.95
5.3.30.0130.03313.68
5.3.20.0070.07013.68
5.3.10.0070.05713.61
5.3.00.0030.07313.61
5.2.170.0100.04311.14
5.2.160.0000.03710.93
5.2.150.0100.06011.18
5.2.140.0000.03710.97
5.2.130.0030.03311.16
5.2.120.0000.06011.09
5.2.110.0030.05311.06
5.2.100.0100.05711.02
5.2.90.0000.03711.09
5.2.80.0000.04311.13
5.2.70.0030.05011.01
5.2.60.0030.05011.04
5.2.50.0000.03311.01
5.2.40.0030.04710.99
5.2.30.0100.03710.77
5.2.20.0170.04010.84
5.2.10.0000.03310.91
5.2.00.0000.06710.57
5.1.60.0070.0479.82
5.1.50.0000.0409.82
5.1.40.0100.02310.01
5.1.30.0000.04310.23
5.1.20.0030.02710.39
5.1.10.0030.04310.10
5.1.00.0070.02710.11
5.0.50.0100.0138.61
5.0.40.0130.0338.39
5.0.30.0130.0278.23
5.0.20.0000.0438.29
5.0.10.0070.0278.23
5.0.00.0000.0638.23
4.4.90.0030.0278.23
4.4.80.0030.0238.23
4.4.70.0030.0278.23
4.4.60.0030.0308.23
4.4.50.0000.0208.23
4.4.40.0000.0578.23
4.4.30.0170.0238.23
4.4.20.0000.0238.23
4.4.10.0000.0208.23
4.4.00.0000.0608.23
4.3.110.0000.0308.23
4.3.100.0000.0208.23
4.3.90.0030.0338.23
4.3.80.0200.0178.23
4.3.70.0000.0278.23
4.3.60.0030.0208.23
4.3.50.0000.0208.23
4.3.40.0000.0538.23
4.3.30.0000.0478.23
4.3.20.0030.0208.23
4.3.10.0070.0378.23
4.3.00.0000.0238.23

preferences:
30.91 ms | 403 KiB | 5 Q