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 strcmp('Å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.60.0140.00418.43
8.3.50.0110.00721.93
8.3.40.0000.01518.54
8.3.30.0110.00318.96
8.3.20.0040.00420.30
8.3.10.0070.00023.66
8.3.00.0040.00419.02
8.2.180.0120.00318.04
8.2.170.0150.00022.96
8.2.160.0040.01119.28
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0060.01226.16
8.2.120.0000.00821.05
8.2.110.0030.00622.15
8.2.100.0080.00319.21
8.2.90.0090.00019.25
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0050.00317.80
8.2.50.0040.00418.07
8.2.40.0060.00318.24
8.2.30.0000.00718.10
8.2.20.0050.00317.77
8.2.10.0000.00818.06
8.2.00.0050.00317.66
8.1.280.0070.01025.92
8.1.270.0170.00018.88
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00323.77
8.1.230.0110.00019.02
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0160.00717.00
8.1.190.0030.00517.13
8.1.180.0000.00818.10
8.1.170.0040.00418.48
8.1.160.0040.00421.92
8.1.150.0000.00818.76
8.1.140.0070.00019.21
8.1.130.0070.00017.84
8.1.120.0000.00817.42
8.1.110.0070.00017.36
8.1.100.0030.00317.25
8.1.90.0030.00517.31
8.1.80.0000.00717.42
8.1.70.0000.00717.46
8.1.60.0040.00417.43
8.1.50.0040.00417.51
8.1.40.0030.00517.45
8.1.30.0040.00417.45
8.1.20.0040.00417.45
8.1.10.0000.00817.57
8.1.00.0030.00617.32
8.0.300.0080.00018.77
8.0.290.0070.00016.75
8.0.280.0000.00818.56
8.0.270.0030.00317.27
8.0.260.0030.00317.15
8.0.250.0030.00317.04
8.0.240.0000.00716.95
8.0.230.0040.00416.97
8.0.220.0000.00716.71
8.0.210.0040.00416.84
8.0.200.0040.00416.95
8.0.190.0030.00516.89
8.0.180.0040.00416.93
8.0.170.0000.00716.87
8.0.160.0080.00016.86
8.0.150.0000.00716.86
8.0.140.0040.00416.71
8.0.130.0030.00313.29
8.0.120.0070.00016.72
8.0.110.0070.00016.68
8.0.100.0040.00416.72
8.0.90.0030.00316.70
8.0.80.0070.00716.85
8.0.70.0070.00016.81
8.0.60.0030.00516.72
8.0.50.0040.00416.80
8.0.30.0090.01616.87
8.0.20.0110.00817.40
8.0.10.0040.00417.00
8.0.00.0090.00916.62
7.4.330.0000.00515.03
7.4.320.0040.00416.48
7.4.300.0030.00316.44
7.4.290.0040.00416.55
7.4.280.0060.00316.52
7.4.270.0030.00316.47
7.4.260.0030.00616.37
7.4.250.0000.00816.37
7.4.240.0000.00716.53
7.4.230.0070.00016.64
7.4.220.0070.01116.61
7.4.210.0070.00716.35
7.4.200.0070.00016.53
7.4.160.0130.01016.36
7.4.150.0140.00717.40
7.4.140.0060.01117.86
7.4.130.0100.00716.47
7.4.120.0120.01016.39
7.4.110.0100.00716.42
7.4.100.0100.01016.43
7.4.90.0210.00016.50
7.4.80.0040.01319.39
7.4.70.0140.00416.53
7.4.60.0080.00816.40
7.4.50.0070.00916.29
7.4.40.0000.01815.84
7.4.30.0110.00916.32
7.4.20.0110.00815.81
7.4.10.0140.00715.89
7.4.00.0080.00715.76
7.3.330.0000.00613.20
7.3.320.0050.00013.13
7.3.310.0000.00616.10
7.3.300.0040.00416.17
7.3.290.0070.00816.20
7.3.280.0130.00816.17
7.3.270.0110.01117.40
7.3.260.0030.01416.62
7.3.250.0080.00816.32
7.3.240.0080.00816.41
7.3.230.0120.00916.44
7.3.210.0120.00416.40
7.3.200.0070.01019.39
7.3.190.0060.01016.41
7.3.180.0080.00816.16
7.3.170.0180.00616.15
7.3.160.0110.00716.21
7.3.150.0100.00716.14
7.3.140.0090.00916.28
7.3.130.0070.01116.12
7.3.120.0150.00616.02
7.3.110.0130.00916.14
7.3.100.0180.00415.99
7.3.90.0110.01115.96
7.3.80.0080.01115.68
7.3.70.0130.00616.01
7.3.60.0130.01016.04
7.3.50.0200.00416.29
7.3.40.0070.01416.14
7.3.30.0060.01416.32
7.3.20.0040.01516.10
7.3.10.0170.00416.38
7.3.00.0130.01316.12
7.2.330.0090.00816.66
7.2.320.0140.00416.31
7.2.310.0080.00816.09
7.2.300.0090.00916.49
7.2.290.0140.00316.17
7.2.280.0080.01316.16
7.2.270.0110.00816.19
7.2.260.0080.01116.09
7.2.250.0110.00816.45
7.2.240.0090.01216.27
7.2.230.0250.00016.43
7.2.220.0090.01216.29
7.2.210.0190.00316.27
7.2.200.0160.01316.32
7.2.190.0170.00616.39
7.2.180.0110.01416.52
7.2.170.0100.01416.37
7.2.160.0170.00616.38
7.2.150.0160.01216.29
7.2.140.0140.01116.16
7.2.130.0140.02116.39
7.2.120.0200.01316.40
7.2.110.0200.01316.46
7.2.100.0250.00616.28
7.2.90.0180.01116.14
7.2.80.0230.00416.32
7.2.70.0150.01316.50
7.2.60.0180.00616.33
7.2.50.0170.00916.61
7.2.40.0240.00816.65
7.2.30.0200.00816.47
7.2.20.0190.00816.46
7.2.10.0230.00516.57
7.2.00.0120.00917.27
7.1.330.0050.01315.18
7.1.320.0140.00915.36
7.1.310.0180.00315.45
7.1.300.0160.00715.51
7.1.290.0200.00715.36
7.1.280.0080.01115.20
7.1.270.0110.01115.29
7.1.260.0100.01015.35
7.1.250.0100.01615.27
7.1.240.0260.00015.30
7.1.230.0120.01315.35
7.1.220.0200.01115.40
7.1.210.0130.01015.56
7.1.200.0130.00915.25
7.1.190.0180.00815.29
7.1.180.0110.01115.45
7.1.170.0160.01115.47
7.1.160.0130.00715.32
7.1.150.0150.01115.27
7.1.140.0140.01015.40
7.1.130.0140.01115.42
7.1.120.0210.01015.34
7.1.110.0140.01015.23
7.1.100.0440.00815.59
7.1.90.0140.00915.38
7.1.80.0160.00515.46
7.1.70.0120.00616.02
7.1.60.0210.00916.86
7.1.50.0130.01215.99
7.1.40.0680.00515.49
7.1.30.0140.00915.49
7.1.20.0150.00915.49
7.1.10.0180.00715.57
7.1.00.0120.03017.68
7.0.330.0130.01015.00
7.0.320.0120.01215.09
7.0.310.0120.01215.03
7.0.300.0180.00715.06
7.0.290.0070.01315.07
7.0.280.0130.00615.03
7.0.270.0180.00915.15
7.0.260.0190.00615.07
7.0.250.0180.00514.96
7.0.240.0190.00315.17
7.0.230.0100.00815.12
7.0.220.0180.00515.20
7.0.210.0130.00715.16
7.0.200.0090.00815.68
7.0.190.0140.00715.09
7.0.180.0160.00614.99
7.0.170.0110.00815.04
7.0.160.0130.00915.24
7.0.150.0110.01015.01
7.0.140.0110.01617.28
7.0.130.0180.00615.16
7.0.120.0200.00515.21
7.0.110.0170.00614.95
7.0.100.0180.01215.02
7.0.90.0160.00915.05
7.0.80.0180.00615.17
7.0.70.0240.00815.08
7.0.60.0100.03216.71
7.0.50.0180.02316.14
7.0.40.0080.02316.14
7.0.30.0210.02216.17
7.0.20.0150.03716.19
7.0.10.0120.01815.97
7.0.00.0120.02916.14
5.6.400.0140.01015.53
5.6.390.0070.01615.69
5.6.380.0150.00714.90
5.6.370.0180.00214.94
5.6.360.0150.00714.97
5.6.350.0130.00714.76
5.6.340.0060.01415.08
5.6.330.0170.00914.77
5.6.320.0090.00914.88
5.6.310.0130.00415.14
5.6.300.0140.00914.86
5.6.290.0090.01315.15
5.6.280.0110.03016.88
5.6.270.0070.01314.90
5.6.260.0110.00915.06
5.6.250.0090.01215.01
5.6.240.0150.00814.90
5.6.230.0110.01015.05
5.6.220.0140.00814.83
5.6.210.0090.03316.87
5.6.200.0140.02816.07
5.6.190.0100.03316.81
5.6.180.1400.02316.84
5.6.170.0170.02616.75
5.6.160.0070.02616.72
5.6.150.0110.02216.01
5.6.140.0090.01916.09
5.6.130.0110.01815.99
5.6.120.0090.02016.89
5.6.110.0120.02117.01
5.6.100.0100.02616.84
5.6.90.0120.03316.88
5.6.80.0070.03616.71
5.6.70.1510.02216.56
5.6.60.0130.00514.85
5.6.50.0120.00914.88
5.6.40.0120.00914.86
5.6.30.0100.00914.87
5.6.20.0140.01014.72
5.6.10.0140.00414.88
5.6.00.0090.01214.95
5.5.380.0110.01113.23
5.5.370.0110.00713.31
5.5.360.0100.00713.56
5.5.350.0190.03015.81
5.5.340.0110.03314.95
5.5.330.0090.02115.81
5.5.320.0180.02815.68
5.5.310.0240.02515.64
5.5.300.0120.01814.87
5.5.290.0140.02614.97
5.5.280.0120.02715.96
5.5.270.0100.01915.81
5.5.260.0130.02915.73
5.5.250.0110.01715.61
5.5.240.0130.02315.55
5.5.230.0120.00613.28
5.5.220.0080.00913.54
5.5.210.0080.01013.27
5.5.200.0140.00413.33
5.5.190.0070.01113.17
5.5.180.0110.00813.11
5.5.170.0090.01114.88
5.5.160.0090.00913.30
5.5.150.0110.00913.34
5.5.140.0100.00813.25
5.5.130.0110.00713.42
5.5.120.0090.00713.27
5.5.110.0120.00713.24
5.5.100.0120.00613.38
5.5.90.0080.01013.28
5.5.80.0120.00513.25
5.5.70.0100.00813.28
5.5.60.0090.00813.23
5.5.50.0120.00713.28
5.5.40.0060.01113.20
5.5.30.0080.00813.08
5.5.20.0100.00913.32
5.5.10.0070.01213.31
5.5.00.0110.00812.99
5.4.450.0300.02914.16
5.4.440.0090.02314.21
5.4.430.0120.02314.29
5.4.420.0080.02614.43
5.4.410.0080.02314.24
5.4.400.0100.02814.20
5.4.390.0160.02113.84
5.4.380.0160.02313.97
5.4.370.0140.02514.09
5.4.360.0190.01813.97
5.4.350.0180.02113.98
5.4.340.0170.02514.07
5.4.330.0100.00411.69
5.4.320.0190.02213.98
5.4.310.0200.01914.08
5.4.300.0160.02013.98
5.4.290.0150.02113.89
5.4.280.0150.02314.02
5.4.270.0190.02414.06
5.4.260.0200.02113.89
5.4.250.0150.02513.93
5.4.240.0150.02313.98
5.4.230.0130.02414.00
5.4.220.0130.02414.05
5.4.210.0220.01713.94
5.4.200.0130.02513.31
5.4.190.0180.02113.92
5.4.180.0140.02513.79
5.4.170.0190.02114.02
5.4.160.0150.02414.00
5.4.150.0190.01913.92
5.4.140.0180.02013.24
5.4.130.0200.01713.13
5.4.120.0200.02013.36
5.4.110.0220.01713.28
5.4.100.0160.02013.23
5.4.90.0160.02113.17
5.4.80.0140.02213.13
5.4.70.0140.02413.29
5.4.60.0140.02213.21
5.4.50.0160.02013.18
5.4.40.0160.02213.27
5.4.30.0200.02013.28
5.4.20.0170.02213.16
5.4.10.0140.02213.22
5.4.00.0140.02212.92
5.3.290.0130.02412.54
5.3.280.0170.01912.48
5.3.270.0140.02712.53
5.3.260.0140.02112.52
5.3.250.0140.02612.48
5.3.240.0160.02412.40
5.3.230.0210.02512.42
5.3.220.0150.02312.48
5.3.210.0170.02512.37
5.3.200.0160.01912.44
5.3.190.0170.02412.48
5.3.180.0160.01912.62
5.3.170.0180.01912.58
5.3.160.0150.02012.55
5.3.150.0140.02212.59
5.3.140.0120.02412.54
5.3.130.0120.02312.54
5.3.120.0110.02612.67
5.3.110.0190.02112.47
5.3.100.0120.02312.31
5.3.90.0170.02012.36
5.3.80.0150.01912.28
5.3.70.0160.01912.24
5.3.60.0140.02612.34
5.3.50.0120.02512.26
5.3.40.0150.02112.19
5.3.30.0180.02212.19
5.3.20.0170.01912.20
5.3.10.0140.02011.95
5.3.00.0110.02412.05
5.2.170.0100.02310.79
5.2.160.0130.01710.74
5.2.150.0110.02110.74
5.2.140.0110.02010.67
5.2.130.0140.01710.56
5.2.120.0100.02010.67
5.2.110.0120.01810.66
5.2.100.0110.01810.66
5.2.90.0130.01710.58
5.2.80.0090.02210.56
5.2.70.0110.02010.52
5.2.60.0110.01810.61
5.2.50.0110.01810.70
5.2.40.0100.01910.60
5.2.30.0130.01810.66
5.2.20.0120.01810.52
5.2.10.0090.01810.38
5.2.00.0120.01610.37
5.1.60.0090.0169.95
5.1.50.0120.0139.88
5.1.40.0120.0149.97
5.1.30.0140.01510.02
5.1.20.0120.0189.99
5.1.10.0110.0159.95
5.1.00.0120.0199.81
5.0.50.0050.0159.23
5.0.40.0070.0129.20
5.0.30.0090.0169.11
5.0.20.0060.0159.11
5.0.10.0090.0129.14
5.0.00.0110.0159.09
4.4.90.0060.0088.32
4.4.80.0070.0108.31
4.4.70.0060.0108.32
4.4.60.0070.0088.32
4.4.50.0040.0118.33
4.4.40.0090.0108.34
4.4.30.0050.0118.32
4.4.20.0050.0118.33
4.4.10.0010.0148.34
4.4.00.0070.0138.32
4.3.110.0050.0118.30
4.3.100.0070.0098.27
4.3.90.0060.0108.30
4.3.80.0050.0158.29
4.3.70.0070.0098.29
4.3.60.0050.0108.29
4.3.50.0070.0098.28
4.3.40.0060.0148.30
4.3.30.0030.0117.88
4.3.20.0040.0107.86
4.3.10.0040.0117.89
4.3.00.0040.0108.75

preferences:
43.58 ms | 401 KiB | 5 Q