3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abc = array( 'rec_1' => array('fn'=>'Aron','ln'=>'Michaelson'), 'rec_2' => array('fn'=>'Abbey','ln'=>'Drake'), 'rec_3' => array('fn'=>'Alice','ln'=>'Peterson')); function build_sorter($key) { return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; } usort($abc, build_sorter('ln')); foreach ($abc as $item) { echo strtoupper($item['ln']) . ', ' . $item['fn'] . "\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.3.60.0070.01418.31
8.3.50.0090.00922.81
8.3.40.0100.01018.89
8.3.30.0140.00019.08
8.3.20.0000.00720.35
8.3.10.0070.00021.95
8.3.00.0050.00319.68
8.2.180.0150.00025.92
8.2.170.0060.00918.94
8.2.160.0100.00322.96
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0060.00319.16
8.2.100.0040.00817.78
8.2.90.0040.00419.26
8.2.80.0040.00418.04
8.2.70.0030.00517.75
8.2.60.0040.00417.93
8.2.50.0050.00519.38
8.2.40.0040.00418.03
8.2.30.0050.00219.50
8.2.20.0000.00717.74
8.2.10.0070.00018.22
8.2.00.0000.00717.62
8.1.280.0090.00625.92
8.1.270.0090.00022.14
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0070.01122.45
8.1.230.0120.00021.00
8.1.220.0050.00318.77
8.1.210.0000.00818.97
8.1.200.0060.00617.35
8.1.190.0000.00817.63
8.1.180.0060.00318.10
8.1.170.0040.00418.71
8.1.160.0040.00718.91
8.1.150.0000.00718.85
8.1.140.0040.00417.38
8.1.130.0030.00320.13
8.1.120.0000.00817.46
8.1.110.0040.00417.39
8.1.100.0030.00317.46
8.1.90.0040.00417.48
8.1.80.0000.00717.45
8.1.70.0030.00317.32
8.1.60.0080.00017.61
8.1.50.0000.00817.59
8.1.40.0000.00817.55
8.1.30.0030.00517.72
8.1.20.0040.00717.49
8.1.10.0040.00417.48
8.1.00.0000.00817.50
8.0.300.0000.00919.99
8.0.290.0000.00817.18
8.0.280.0070.00018.50
8.0.270.0070.00017.17
8.0.260.0000.00618.30
8.0.250.0030.00316.89
8.0.240.0030.00316.94
8.0.230.0000.00716.95
8.0.220.0000.00716.88
8.0.210.0000.00716.78
8.0.200.0030.00316.81
8.0.190.0040.00416.99
8.0.180.0050.00316.96
8.0.170.0030.00616.91
8.0.160.0020.00516.86
8.0.150.0070.00016.82
8.0.140.0000.00816.94
8.0.130.0060.00013.37
8.0.120.0030.00616.91
8.0.110.0000.00816.89
8.0.100.0000.00716.95
8.0.90.0000.00716.92
8.0.80.0030.01316.92
8.0.70.0000.00816.77
8.0.60.0030.00516.77
8.0.50.0040.00416.96
8.0.30.0080.01116.98
8.0.20.0110.01017.41
8.0.10.0030.00617.02
8.0.00.0130.00616.82
7.4.330.0050.00015.02
7.4.320.0030.00316.39
7.4.300.0030.00516.57
7.4.290.0000.00716.59
7.4.280.0000.00816.59
7.4.270.0000.00716.62
7.4.260.0000.00616.62
7.4.250.0040.00416.48
7.4.240.0020.00516.49
7.4.230.0070.00016.65
7.4.220.0110.01416.62
7.4.210.0030.01016.70
7.4.200.0000.00716.59
7.4.160.0060.01116.32
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0060.01216.52
7.4.120.0090.01116.42
7.4.110.0050.01316.63
7.4.100.0100.01016.54
7.4.90.0100.00716.49
7.4.80.0140.00719.39
7.4.70.0090.00916.46
7.4.60.0110.01116.50
7.4.50.0000.00416.38
7.4.40.0090.01216.43
7.4.30.0090.00816.50
7.4.00.0130.00014.90
7.3.330.0050.00313.32
7.3.320.0000.00613.35
7.3.310.0000.00716.39
7.3.300.0040.00416.41
7.3.290.0110.00616.28
7.3.280.0060.01216.30
7.3.270.0130.00317.40
7.3.260.0130.00616.45
7.3.250.0030.01416.53
7.3.240.0080.00916.63
7.3.230.0090.00916.59
7.3.210.0040.01316.31
7.3.200.0200.00519.39
7.3.190.0060.01216.51
7.3.180.0080.00816.44
7.3.170.0100.00716.54
7.3.160.0120.00416.61
7.2.330.0100.00716.89
7.2.320.0070.01116.77
7.2.310.0120.00916.48
7.2.300.0060.01216.51
7.2.290.0120.00916.84
7.2.60.0090.00616.82
7.1.200.0070.00315.73
7.1.70.0030.00517.23
7.1.60.0130.01019.34
7.1.50.0000.02216.99
7.1.00.0100.07022.54
7.0.200.0040.00416.86
7.0.140.0030.06321.97
7.0.60.0100.07319.91
7.0.50.0200.06017.89
7.0.40.0130.08020.11
7.0.30.0330.06320.07
7.0.20.0200.08320.33
7.0.10.0330.04320.22
7.0.00.0130.03720.23
5.6.280.0030.07320.93
5.6.210.0070.07320.70
5.6.200.0070.04318.23
5.6.190.0100.08020.48
5.6.180.0300.06020.75
5.6.170.0370.08020.54
5.6.160.0030.04020.56
5.6.150.0070.07718.17
5.6.140.0000.04318.15
5.6.130.0030.04018.11
5.6.120.0070.08021.12
5.6.110.0070.04021.12
5.6.100.0130.07720.99
5.6.90.0130.06320.98
5.6.80.0130.07720.37
5.6.70.0200.04020.41
5.5.350.3570.04020.47
5.5.340.0100.08018.07
5.5.330.0100.07320.42
5.5.320.0000.04020.16
5.5.310.0400.07020.30
5.5.300.0100.03717.97
5.5.290.0130.08018.05
5.5.280.0070.05020.79
5.5.270.0070.08320.77
5.5.260.0100.03720.76
5.5.250.0130.08020.62
5.5.240.0300.05320.27
5.4.450.0130.04719.64
5.4.440.0200.04719.48
5.4.430.0330.06319.31
5.4.420.0270.07319.38
5.4.410.0230.05019.42
5.4.400.0230.05719.21
5.4.390.0270.05018.95
5.4.380.0200.04319.09
5.4.370.0270.07019.22
5.4.360.0170.04019.22
5.4.350.0500.04719.05
5.4.340.0300.06319.15
5.4.320.0200.05018.84
5.4.310.0370.03318.84
5.4.300.0230.06019.13
5.4.290.0300.06719.31
5.4.280.0300.05719.24
5.4.270.0200.04019.08
5.4.260.0230.03319.09
5.4.250.0130.04319.07
5.4.240.0230.06719.21
5.4.230.0300.06719.15
5.4.220.0300.06019.01
5.4.210.0200.07719.05
5.4.200.0230.04319.08
5.4.190.0230.06718.93
5.4.180.0300.06318.86
5.4.170.0300.06018.94
5.4.160.0200.08018.84
5.4.150.0300.03318.96
5.4.140.0230.03316.55
5.4.130.0400.05316.38
5.4.120.0230.03716.40
5.4.110.0200.07716.64
5.4.100.0370.05016.61
5.4.90.0270.04016.60
5.4.80.0230.04716.61
5.4.70.0230.04016.44
5.4.60.0270.06016.23
5.4.50.0330.06016.43
5.4.40.0300.06316.34
5.4.30.0270.05716.51
5.4.20.0330.03716.23
5.4.10.0170.04016.16
5.4.00.0270.06715.90
5.3.290.0270.06714.68
5.3.280.0230.04314.68
5.3.270.0230.04714.63
5.3.260.0270.04314.69
5.3.250.0270.03014.83
5.3.240.0330.05714.61
5.3.230.0170.04014.57
5.3.220.0200.05314.47
5.3.210.0300.04014.47
5.3.200.0200.03714.47
5.3.190.0230.04014.47
5.3.180.0200.04714.64
5.3.170.0270.06714.59
5.3.160.0230.07314.48
5.3.150.0170.07014.46
5.3.140.0170.04714.57
5.3.130.0270.05314.52
5.3.120.0270.03014.77
5.3.110.0300.06714.55
5.3.100.0230.05713.95
5.3.90.0270.04014.07
5.3.80.0230.03014.00
5.3.70.0200.04314.00
5.3.60.0270.02714.11
5.3.50.0200.03314.10
5.3.40.0200.03314.09
5.3.30.0130.04013.81
5.3.20.0270.03313.63
5.3.10.0170.03013.57
5.3.00.0230.05013.55
5.2.170.0170.02711.26
5.2.160.0100.03311.05
5.2.150.0170.02711.16
5.2.140.0130.03011.22
5.2.130.0130.03011.18
5.2.120.0170.03311.00
5.2.110.0200.03311.32
5.2.100.0170.03011.13
5.2.90.0130.03711.00
5.2.80.0170.03311.24
5.2.70.0100.04011.17
5.2.60.0200.06011.13
5.2.50.0130.03711.08
5.2.40.0100.03311.07
5.2.30.0100.04010.89
5.2.20.0130.03710.96
5.2.10.0100.03011.02
5.2.00.0130.02710.68
5.1.60.0170.0209.94
5.1.50.0170.02010.08
5.1.40.0130.0279.87
5.1.30.0100.03310.41
5.1.20.0170.02710.35
5.1.10.0130.0279.96
5.1.00.0100.04310.22
5.0.50.0100.0238.53
5.0.40.0070.0278.29
5.0.30.0070.0308.33
5.0.20.0070.0278.28
5.0.10.0030.0278.10
5.0.00.0070.0338.09
4.4.90.0070.0177.58
4.4.80.0030.0307.58
4.4.70.0100.0177.58
4.4.60.0130.0137.58
4.4.50.0070.0207.58
4.4.40.0030.0307.58
4.4.30.0000.0177.58
4.4.20.0000.0237.58
4.4.10.0000.0177.58
4.4.00.0130.0177.58
4.3.110.0030.0277.58
4.3.100.0100.0177.58
4.3.90.0070.0177.58
4.3.80.0030.0307.58
4.3.70.0100.0277.58
4.3.60.0130.0277.58
4.3.50.0070.0307.58
4.3.40.0070.0277.58
4.3.30.0000.0237.58
4.3.20.0000.0207.58
4.3.10.0030.0177.58
4.3.00.0000.0237.58

preferences:
42.69 ms | 401 KiB | 5 Q