3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = [ 'A Place', 'B Place', 'ZZZ Place', 'Åland Islands', -2, -1, 1, 2, 0, array(), array('test'), 'access_module_a1', 'access_module_a2', ]; //natcasesort($foo); echo "\nNatural order sorting (case-insensitive)\n"; //print_r($foo); echo strnatcasecmp('Åland Islands', '1'); function sortByKeyString($a, $b, $key) { $a_title = (is_array($a) && isset($a[$key])) ? $a[$key] : ''; $b_title = (is_array($b) && isset($b[$key])) ? $b[$key] : ''; strnatcasecmp($a_title, $b_title); }

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.40.0040.01118.71
8.3.30.0070.00719.00
8.3.20.0000.00720.34
8.3.10.0080.00023.52
8.3.00.0090.00019.05
8.2.170.0070.00722.96
8.2.160.0040.01119.46
8.2.150.0050.00324.18
8.2.140.0030.00724.66
8.2.130.0130.00626.16
8.2.120.0040.00420.80
8.2.110.0050.00519.45
8.2.100.0040.00817.91
8.2.90.0000.00819.24
8.2.80.0080.00017.97
8.2.70.0030.00617.38
8.2.60.0060.00317.93
8.2.50.0000.00818.10
8.2.40.0030.00518.16
8.2.30.0040.00417.96
8.2.20.0000.00817.61
8.2.10.0050.00317.92
8.2.00.0050.00317.51
8.1.270.0030.00718.91
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0090.00022.43
8.1.230.0120.00017.71
8.1.220.0030.00517.75
8.1.210.0050.00318.77
8.1.200.0060.00317.36
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0000.00818.43
8.1.160.0040.00421.95
8.1.150.0040.00318.75
8.1.140.0000.00919.10
8.1.130.0030.00317.75
8.1.120.0040.00417.40
8.1.110.0000.00717.41
8.1.100.0040.00417.38
8.1.90.0040.00417.32
8.1.80.0000.00717.32
8.1.70.0040.00417.41
8.1.60.0120.00017.56
8.1.50.0000.00917.44
8.1.40.0040.00417.46
8.1.30.0040.00417.59
8.1.20.0080.00017.54
8.1.10.0030.00617.47
8.1.00.0040.00417.31
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0030.00318.46
8.0.270.0000.00717.27
8.0.260.0060.00017.32
8.0.250.0070.00016.86
8.0.240.0070.00016.99
8.0.230.0000.00716.91
8.0.220.0050.00316.76
8.0.210.0040.00416.77
8.0.200.0030.00716.90
8.0.190.0070.00016.89
8.0.180.0070.00016.87
8.0.170.0040.00416.83
8.0.160.0050.00216.91
8.0.150.0000.00716.86
8.0.140.0000.00716.76
8.0.130.0050.00013.31
8.0.120.0000.00816.70
8.0.110.0020.00516.79
8.0.100.0080.00016.83
8.0.90.0030.00416.96
8.0.80.0040.01116.79
8.0.70.0040.00416.82
8.0.60.0040.00416.73
8.0.50.0000.00716.85
8.0.30.0110.01317.18
8.0.20.0110.00917.40
8.0.10.0070.00016.84
8.0.00.0130.00516.67
7.4.330.0000.00515.03
7.4.320.0040.00416.53
7.4.300.0060.00016.43
7.4.290.0070.00016.56
7.4.280.0000.00716.51
7.4.270.0030.00316.55
7.4.260.0050.00216.30
7.4.250.0080.00016.52
7.4.240.0030.00516.52
7.4.230.0030.00316.53
7.4.220.0100.01416.50
7.4.210.0000.01516.51
7.4.200.0000.00816.53
7.4.160.0030.01716.43
7.4.150.0110.00717.40
7.4.140.0150.00517.86
7.4.130.0100.00716.42
7.4.120.0060.01116.39
7.4.110.0130.00616.45
7.4.100.0100.01316.47
7.4.90.0180.00616.36
7.4.80.0160.00319.39
7.4.70.0170.00316.40
7.4.60.0060.00916.45
7.4.50.0040.00416.56
7.4.40.0070.01116.46
7.4.30.0100.00716.53
7.4.00.0090.00815.06
7.3.330.0000.00513.27
7.3.320.0000.00513.19
7.3.310.0040.00416.13
7.3.300.0000.00616.05
7.3.290.0060.00816.19
7.3.280.0100.01116.17
7.3.270.0090.00917.40
7.3.260.0030.01416.20
7.3.250.0060.01216.18
7.3.240.0060.01016.25
7.3.230.0100.00716.47
7.3.210.0050.01116.19
7.3.200.0060.01219.39
7.3.190.0080.00816.38
7.3.180.0100.00716.45
7.3.170.0110.00616.27
7.3.160.0130.00316.18
7.3.120.0040.01014.75
7.3.110.0060.00914.88
7.3.100.0040.01014.79
7.3.90.0070.00714.78
7.3.80.0030.01214.86
7.3.70.0070.00714.59
7.3.60.0100.00414.74
7.3.50.0120.00314.49
7.3.40.0000.01214.71
7.3.30.0050.00914.72
7.3.20.0050.01216.67
7.3.10.0060.00616.38
7.3.00.0090.00616.65
7.2.330.0140.00416.48
7.2.320.0000.01716.53
7.2.310.0100.00616.52
7.2.300.0100.01316.51
7.2.290.0060.01216.60
7.2.250.0060.01115.06
7.2.240.0030.01614.92
7.2.230.0030.01414.92
7.2.220.0070.00314.94
7.2.210.0060.01014.96
7.2.200.0060.00415.09
7.2.190.0090.00514.96
7.2.180.0040.00914.92
7.2.170.0020.01314.87
7.2.00.0060.00619.36
7.1.330.0030.01015.55
7.1.320.0040.00615.67
7.1.310.0050.00815.76
7.1.300.0050.01015.64
7.1.290.0070.00715.74
7.1.280.0060.00515.67
7.1.270.0110.00515.64
7.1.260.0070.00915.60
7.1.100.0930.00616.14
7.1.70.0030.00917.00
7.1.60.0140.01119.46
7.1.50.0070.01716.85
7.1.00.0070.07322.46
7.0.200.0040.00416.57
7.0.140.0070.05321.97
7.0.100.0000.04320.01
7.0.90.0300.07319.90
7.0.80.0030.05719.91
7.0.70.0070.04319.86
7.0.60.0170.07019.96
7.0.50.0130.06320.39
7.0.40.0030.04720.09
7.0.30.0100.08320.13
7.0.20.0100.08320.09
7.0.10.0200.06720.08
7.0.00.0070.05020.15
5.6.280.0000.07321.03
5.6.250.0070.05020.61
5.6.240.0070.05720.67
5.6.230.0070.08020.63
5.6.220.0070.07020.62
5.6.210.0100.07020.73
5.6.200.0100.07721.02
5.6.190.0170.06721.03
5.6.180.0000.05020.93
5.6.170.0070.09021.09
5.6.160.0100.06721.05
5.6.150.0130.07720.95
5.6.140.0230.07021.06
5.6.130.0030.05020.93
5.6.120.0130.06321.02
5.6.110.0030.05021.15
5.6.100.0130.06721.00
5.6.90.0030.06321.08
5.6.80.0000.05020.42
5.6.70.0030.07020.35
5.6.60.0100.06720.35
5.6.50.0100.07020.39
5.6.40.0030.05020.48
5.6.30.0130.03320.43
5.6.20.0070.06720.38
5.6.10.0070.06720.45
5.6.00.0000.04720.35
5.5.380.0130.04720.50
5.5.370.0100.04320.43
5.5.360.0030.05020.44
5.5.350.0100.08020.33
5.5.340.0000.07720.88
5.5.330.0100.05020.89
5.5.320.0100.08720.86
5.5.310.0070.06020.80
5.5.300.0100.05320.91
5.5.290.0130.07720.92
5.5.280.0070.08320.87
5.5.270.0100.04320.89
5.5.260.0070.09020.75
5.5.250.0100.06720.61
5.5.240.0200.06720.14
5.5.230.0030.07320.27
5.5.220.0030.09020.20
5.5.210.0170.06720.28
5.5.200.0170.03720.24
5.5.190.0070.06319.99
5.5.180.0030.06720.14
5.5.160.0030.04720.23
5.5.150.0030.05020.21
5.5.140.0070.05720.27
5.5.130.0130.07720.15
5.5.120.0100.06720.25
5.5.110.0070.04320.16
5.5.100.0070.08720.06
5.5.90.0100.07020.00
5.5.80.0070.08320.07
5.5.70.0100.08020.14
5.5.60.0070.05020.14
5.5.50.0100.06720.04
5.5.40.0030.04320.08
5.5.30.0070.06320.06
5.5.20.0070.07019.95
5.5.10.0070.03720.05
5.5.00.0070.07319.99
5.4.450.0070.06319.37
5.4.440.0070.07719.36
5.4.430.0130.07319.50
5.4.420.0130.07019.54
5.4.410.0000.07019.32
5.4.400.0100.03719.11
5.4.390.0070.03718.95
5.4.380.0200.06319.18
5.4.370.0130.07019.23
5.4.360.0100.08319.16
5.4.350.0070.05719.16
5.4.340.0130.07319.13
5.4.320.0070.07019.16
5.4.310.0070.07018.87
5.4.300.0000.08319.18
5.4.290.0130.06319.04
5.4.280.0100.07319.09
5.4.270.0070.07019.21
5.4.260.0070.05018.94
5.4.250.0100.06719.02
5.4.240.0000.05018.84
5.4.230.0100.06719.15
5.4.220.0130.04019.03
5.4.210.0000.05319.12
5.4.200.0070.04319.02
5.4.190.0170.05319.15
5.4.180.0130.06719.03
5.4.170.0130.06319.17
5.4.160.0100.07718.89
5.4.150.0070.04319.12
5.4.140.0070.08016.33
5.4.130.0100.06016.44
5.4.120.0170.06716.38
5.4.110.0070.05716.43
5.4.100.0070.04316.49
5.4.90.0100.06316.39
5.4.80.0100.03716.30
5.4.70.0100.06316.45
5.4.60.0170.06316.37
5.4.50.0170.06716.24
5.4.40.0130.04016.41
5.4.30.0030.08016.39
5.4.20.0100.03716.39
5.4.10.0130.06316.44
5.4.00.0070.04015.68
5.3.290.0130.06714.50
5.3.280.0030.04714.59
5.3.270.0030.04314.56
5.3.260.0030.07014.57
5.3.250.0100.07314.58
5.3.240.0130.06014.47
5.3.230.0070.06714.43
5.3.220.0030.08314.52
5.3.210.0070.04014.55
5.3.200.0030.04314.56
5.3.190.0070.05714.43
5.3.180.0100.07014.40
5.3.170.0070.03714.55
5.3.160.0070.07014.55
5.3.150.0130.04314.55
5.3.140.0130.07014.49
5.3.130.0070.04314.48
5.3.120.0100.07014.56
5.3.110.0070.07314.42
5.3.100.0130.07013.95
5.3.90.0070.04713.97
5.3.80.0200.06013.77
5.3.70.0070.06713.96
5.3.60.0100.06713.96
5.3.50.0030.06313.70
5.3.40.0100.06713.85
5.3.30.0000.05013.84
5.3.20.0030.03713.64
5.3.10.0070.06713.51
5.3.00.0030.08013.62
5.2.170.0130.04311.16
5.2.160.0030.05310.95
5.2.150.0030.05311.13
5.2.140.0030.04011.10
5.2.130.0100.06010.93
5.2.120.0030.06011.04
5.2.110.0100.04311.08
5.2.100.0000.04710.94
5.2.90.0070.03010.94
5.2.80.0000.03311.12
5.2.70.0000.03311.05
5.2.60.0070.03710.89
5.2.50.0070.03311.00
5.2.40.0130.03010.87
5.2.30.0030.06310.83
5.2.20.0100.05710.80
5.2.10.0100.03710.90
5.2.00.0130.05010.77
5.1.60.0000.03010.02
5.1.50.0070.0309.98
5.1.40.0100.04710.00
5.1.30.0000.05710.19
5.1.20.0030.05710.40
5.1.10.0170.0279.94
5.1.00.0100.0279.94
5.0.50.0100.0278.53
5.0.40.0000.0338.45
5.0.30.0030.0338.45
5.0.20.0000.0238.45
5.0.10.0000.0338.45
5.0.00.0000.0338.45
4.4.90.0070.0138.45
4.4.80.0030.0338.45
4.4.70.0000.0278.45
4.4.60.0000.0208.45
4.4.50.0000.0238.45
4.4.40.0000.0508.45
4.4.30.0030.0178.45
4.4.20.0000.0238.45
4.4.10.0030.0238.45
4.4.00.0030.0278.45
4.3.110.0030.0208.45
4.3.100.0000.0378.45
4.3.90.0070.0308.45
4.3.80.0030.0238.45
4.3.70.0030.0208.45
4.3.60.0000.0178.45
4.3.50.0100.0178.45
4.3.40.0030.0278.45
4.3.30.0000.0178.45
4.3.20.0030.0308.45
4.3.10.0000.0278.45
4.3.00.0000.0278.45

preferences:
42.75 ms | 400 KiB | 5 Q