3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abc = array( 'rec_1' => array('f_name'=>'Aron','m_i'=>'M'), 'rec_2' => array('f_name'=>'Abbey','m_i'=>'D'), 'rec_3' => array('f_name'=>'Alice','m_i'=>'P')); function build_sorter($key) { var_dump($a); var_dump($b); exit; return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; } usort($abc, build_sorter('f_name')); foreach ($abc as $item) { echo $item['f_name'] . ', ' . $item['m_i'] . "\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.0100.01316.88
8.3.50.0120.00822.92
8.3.40.0070.00718.77
8.3.30.0100.00718.93
8.3.20.0050.00320.29
8.3.10.0000.00821.86
8.3.00.0030.00519.66
8.2.180.0080.01125.92
8.2.170.0110.01119.02
8.2.160.0100.00322.96
8.2.150.0090.00924.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0100.00317.50
8.2.110.0040.00422.24
8.2.100.0040.00817.72
8.2.90.0030.00619.13
8.2.80.0040.00417.97
8.2.70.0080.00017.25
8.2.60.0000.00817.78
8.2.50.0070.00418.07
8.2.40.0000.00818.15
8.2.30.0040.00419.43
8.2.20.0080.00017.70
8.2.10.0000.00818.07
8.2.00.0050.00217.86
8.1.280.0060.01225.92
8.1.270.0080.00022.02
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00623.98
8.1.230.0070.00421.03
8.1.220.0000.00818.77
8.1.210.0000.00719.17
8.1.200.0070.00317.23
8.1.190.0050.00317.51
8.1.180.0060.00318.10
8.1.170.0000.00818.57
8.1.160.0020.00518.89
8.1.150.0040.00318.91
8.1.140.0000.00817.46
8.1.130.0030.00617.89
8.1.120.0040.00417.43
8.1.110.0040.00417.39
8.1.100.0030.00317.40
8.1.90.0070.00017.31
8.1.80.0050.00217.40
8.1.70.0070.00017.32
8.1.60.0040.00417.63
8.1.50.0040.00417.53
8.1.40.0000.00717.48
8.1.30.0040.00417.65
8.1.20.0050.00317.60
8.1.10.0000.00717.56
8.1.00.0070.00017.48
8.0.300.0000.00720.02
8.0.290.0040.00417.05
8.0.280.0070.00018.26
8.0.270.0030.00317.27
8.0.260.0030.00317.13
8.0.250.0040.00417.03
8.0.240.0000.00716.91
8.0.230.0000.00716.95
8.0.220.0080.00016.79
8.0.210.0000.00816.80
8.0.200.0030.00316.86
8.0.190.0080.00016.96
8.0.180.0000.00816.84
8.0.170.0060.00316.83
8.0.160.0000.00716.87
8.0.150.0030.00316.89
8.0.140.0050.00216.86
8.0.130.0030.00313.35
8.0.120.0060.00316.81
8.0.110.0080.00016.91
8.0.100.0040.00416.92
8.0.90.0040.00416.74
8.0.80.0090.00616.87
8.0.70.0000.00716.95
8.0.60.0000.00716.81
8.0.50.0040.00416.79
8.0.30.0120.00917.20
8.0.20.0110.00817.40
8.0.10.0040.00417.05
8.0.00.0100.00716.68
7.4.330.0050.00015.02
7.4.320.0030.00316.55
7.4.300.0070.00016.45
7.4.290.0050.00216.52
7.4.280.0050.00316.64
7.4.270.0070.00016.61
7.4.260.0060.00316.57
7.4.250.0040.00416.48
7.4.240.0030.00316.64
7.4.230.0070.00016.62
7.4.220.0070.01416.59
7.4.210.0120.00316.44
7.4.200.0030.00316.32
7.4.160.0080.00816.48
7.4.150.0090.01017.40
7.4.140.0070.01017.86
7.4.130.0120.00916.39
7.4.120.0070.01316.53
7.4.110.0040.01316.46
7.4.100.0080.00816.59
7.4.90.0130.00316.57
7.4.80.0150.00319.39
7.4.70.0070.01116.55
7.4.60.0060.00916.58
7.4.50.0040.00416.52
7.4.40.0190.00016.57
7.4.30.0030.01716.53
7.4.00.0040.01115.04
7.3.330.0060.00013.09
7.3.320.0020.00213.38
7.3.310.0000.00716.34
7.3.300.0030.00316.27
7.3.290.0080.00916.29
7.3.280.0040.01116.27
7.3.270.0110.00817.40
7.3.260.0100.00716.54
7.3.250.0140.00316.35
7.3.240.0050.01316.35
7.3.230.0120.00616.46
7.3.210.0080.01016.47
7.3.200.0150.00419.39
7.3.190.0100.00716.39
7.3.180.0100.00716.35
7.3.170.0110.00716.50
7.3.160.0060.00916.37
7.3.120.0110.00814.77
7.3.110.0090.00914.85
7.3.100.0040.00814.96
7.3.90.0080.00814.81
7.3.80.0050.00814.66
7.3.70.0030.00814.76
7.3.60.0020.01114.80
7.3.50.0070.00614.71
7.3.40.0070.00914.60
7.3.30.0040.00814.69
7.3.20.0050.00916.69
7.3.10.0080.00516.72
7.3.00.0050.00816.40
7.2.330.0160.00316.62
7.2.320.0130.00316.33
7.2.310.0100.00716.81
7.2.300.0040.01216.61
7.2.290.0060.01716.70
7.2.250.0110.00715.14
7.2.240.0100.00815.00
7.2.230.0050.01215.07
7.2.220.0070.00714.81
7.2.210.0070.00814.98
7.2.200.0050.00614.76
7.2.190.0050.01214.92
7.2.180.0040.01414.97
7.2.170.0060.00814.96
7.2.60.0070.00716.57
7.2.00.0040.01219.32
7.1.330.0020.01415.80
7.1.320.0070.00615.65
7.1.310.0100.00715.60
7.1.300.0060.00815.84
7.1.290.0020.01215.70
7.1.280.0060.00515.63
7.1.270.0070.00515.69
7.1.260.0030.00815.78
7.1.200.0040.00415.61
7.1.100.0030.00918.09
7.1.70.0000.00817.24
7.1.60.0110.01419.34
7.1.50.0070.01316.62
7.1.00.0100.07022.30
7.0.200.0000.00716.87
7.0.140.0030.06022.16
7.0.60.0100.08019.87
7.0.50.0070.06717.72
7.0.40.0030.04320.25
7.0.30.0400.05320.09
7.0.20.0300.08720.23
7.0.10.0030.05320.08
7.0.00.0070.04020.05
5.6.280.0000.07720.91
5.6.210.0070.08320.72
5.6.200.0100.08018.16
5.6.190.0100.08720.47
5.6.180.0430.06720.34
5.6.170.0270.06320.50
5.6.160.0100.08020.57
5.6.150.0030.04018.23
5.6.140.0030.08318.15
5.6.130.0030.05018.29
5.6.120.0070.08321.13
5.6.110.0030.07021.09
5.6.100.0030.04720.90
5.6.90.0200.07320.89
5.6.80.0070.07320.39
5.5.350.0200.08020.33
5.5.340.0130.07317.99
5.5.330.0070.06020.30
5.5.320.0070.05020.27
5.5.310.0330.07720.42
5.5.300.0100.03717.98
5.5.290.0170.07317.99
5.5.280.0070.04720.78
5.5.270.0130.04020.65
5.5.260.0100.06720.69
5.5.250.0070.09020.72
5.5.240.0200.07320.07
5.4.450.0230.08019.55
5.4.440.0230.03319.41
5.4.430.0200.06319.54
5.4.420.0200.08019.48
5.4.410.0200.06719.06
5.4.400.0230.07018.88
5.4.390.0130.05019.31
5.4.380.0270.03018.98
5.4.370.0130.03719.16
5.4.360.0130.04018.85
5.4.350.0170.04019.08
5.4.340.0070.04319.32
5.4.320.0200.07019.19
5.4.310.0100.05719.23
5.4.300.0200.04719.31
5.4.290.0170.03318.95
5.4.280.0130.04319.24
5.4.270.0170.07018.98
5.4.260.0270.03019.00
5.4.250.0100.04019.14
5.4.240.0170.03719.13
5.4.230.0200.03719.08
5.4.220.0130.04018.94
5.4.210.0130.04019.30
5.4.200.0270.02719.08
5.4.190.0130.03719.05
5.4.180.0130.04018.84
5.4.170.0130.03719.10
5.4.160.0200.03019.29
5.4.150.0130.03719.22
5.4.140.0100.04016.40
5.4.130.0100.03716.55
5.4.120.0130.04016.39
5.4.110.0130.03716.53
5.4.100.0230.06316.31
5.4.90.0230.04716.65
5.4.80.0230.04716.63
5.4.70.0100.05316.59
5.4.60.0200.07016.48
5.4.50.0270.06016.43
5.4.40.0130.04316.24
5.4.30.0300.05316.48
5.4.20.0170.04316.16
5.4.10.0270.06316.37
5.4.00.0300.05015.76
5.3.290.0100.05314.59
5.3.280.0130.03714.77
5.3.270.0170.03314.62
5.3.260.0100.04714.63
5.3.250.0100.04314.58
5.3.240.0130.03714.62
5.3.230.0130.04014.57
5.3.220.0170.03714.49
5.3.210.0230.04714.49
5.3.200.0170.07714.48
5.3.190.0330.05014.73
5.3.180.0400.05714.54
5.3.170.0500.04714.61
5.3.160.0170.04314.79
5.3.150.0170.04714.55
5.3.140.0200.03714.54
5.3.130.0170.04314.53
5.3.120.0330.04714.47
5.3.110.0300.05314.54
5.3.100.0200.07014.16
5.3.90.0130.05014.01
5.3.80.0300.06314.19
5.3.70.0200.06714.03
5.3.60.0330.05014.12
5.3.50.0230.04313.93
5.3.40.0100.05313.82
5.3.30.0230.07013.82
5.3.20.0270.04713.73
5.3.10.0400.04313.56
5.3.00.0170.05013.66
5.2.170.0230.06011.10
5.2.160.0170.04011.16
5.2.150.0200.06311.08
5.2.140.0270.05711.23
5.2.130.0170.03311.01
5.2.120.0230.05011.03
5.2.110.0200.05711.18
5.2.100.0130.03311.03
5.2.90.0170.05311.01
5.2.80.0200.04011.05
5.2.70.0270.04711.32
5.2.60.0230.02711.11
5.2.50.0200.03711.00
5.2.40.0200.02711.07
5.2.30.0000.04311.19
5.2.20.0200.03010.96
5.2.10.0130.06310.94
5.2.00.0170.05710.68
5.1.60.0130.0409.94
5.1.50.0200.04710.23
5.1.40.0230.0439.87
5.1.30.0230.03010.30
5.1.20.0230.03310.35
5.1.10.0200.0239.97
5.1.00.0130.03710.15
5.0.50.0130.0138.72
5.0.40.0130.0178.72
5.0.30.0030.0378.72
5.0.20.0070.0278.72
5.0.10.0130.0408.72
5.0.00.0200.0378.72
4.4.90.0170.0378.72
4.4.80.0070.0208.72
4.4.70.0030.0208.72
4.4.60.0070.0178.72
4.4.50.0070.0208.72
4.4.40.0130.0338.72
4.4.30.0100.0138.72
4.4.20.0100.0338.72
4.4.10.0130.0138.72
4.4.00.0070.0238.72
4.3.110.0030.0308.72
4.3.100.0070.0178.72
4.3.90.0100.0338.72
4.3.80.0130.0308.72
4.3.70.0070.0338.72
4.3.60.0070.0178.72
4.3.50.0130.0138.72
4.3.40.0100.0238.72
4.3.30.0030.0238.72
4.3.20.0000.0378.72
4.3.10.0030.0278.72
4.3.00.0030.0238.72

preferences:
42.13 ms | 401 KiB | 5 Q