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')); /*function SortByLname($a,$b) { return strcmp( $a['ln'], $b['ln'] ); } usort($abc, "SortByLname"); */ 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.0110.00718.31
8.3.50.0130.00522.99
8.3.40.0140.00718.71
8.3.30.0100.00719.21
8.3.20.0070.00020.23
8.3.10.0000.00821.47
8.3.00.0060.00319.45
8.2.180.0070.00718.41
8.2.170.0060.00922.96
8.2.160.0070.00720.49
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00819.48
8.2.110.0070.00320.38
8.2.100.0040.00817.91
8.2.90.0000.00719.34
8.2.80.0000.00917.97
8.2.70.0080.00017.75
8.2.60.0040.00817.89
8.2.50.0000.00818.07
8.2.40.0000.00918.21
8.2.30.0000.00719.36
8.2.20.0040.00417.74
8.2.10.0000.00718.18
8.2.00.0080.00017.63
8.1.280.0090.00625.92
8.1.270.0080.00021.81
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0060.00323.92
8.1.230.0110.00017.48
8.1.220.0050.00318.77
8.1.210.0040.00419.16
8.1.200.0030.00717.23
8.1.190.0030.00517.30
8.1.180.0050.00318.10
8.1.170.0000.00818.50
8.1.160.0030.00718.81
8.1.150.0030.00518.91
8.1.140.0040.00417.46
8.1.130.0050.00317.79
8.1.120.0040.00417.38
8.1.110.0030.00617.45
8.1.100.0070.00017.46
8.1.90.0030.00617.47
8.1.80.0040.00417.47
8.1.70.0040.00417.42
8.1.60.0000.00817.53
8.1.50.0030.00617.41
8.1.40.0040.00417.45
8.1.30.0030.00517.65
8.1.20.0040.00417.69
8.1.10.0070.00017.49
8.1.00.0040.00417.51
8.0.300.0000.00920.03
8.0.290.0000.00717.28
8.0.280.0070.00018.37
8.0.270.0000.00817.31
8.0.260.0030.00317.20
8.0.250.0040.00416.94
8.0.240.0030.00316.82
8.0.230.0090.00016.87
8.0.220.0030.00316.93
8.0.210.0030.00316.92
8.0.200.0060.00016.90
8.0.190.0050.00316.88
8.0.180.0040.00416.80
8.0.170.0040.00416.94
8.0.160.0000.00716.97
8.0.150.0040.00416.85
8.0.140.0070.00016.83
8.0.130.0000.00513.37
8.0.120.0040.00416.90
8.0.110.0000.00716.91
8.0.100.0000.00716.86
8.0.90.0070.00016.96
8.0.80.0120.00916.89
8.0.70.0000.00816.79
8.0.60.0000.00716.96
8.0.50.0030.00516.80
8.0.30.0130.00416.96
8.0.20.0110.00817.40
8.0.10.0040.00416.89
8.0.00.0080.01216.77
7.4.330.0000.00515.02
7.4.320.0000.00616.65
7.4.300.0030.00316.59
7.4.290.0050.00216.41
7.4.280.0030.00516.39
7.4.270.0000.00716.48
7.4.260.0000.00716.54
7.4.250.0080.00016.41
7.4.240.0030.00316.59
7.4.230.0000.00716.63
7.4.220.0090.00916.51
7.4.210.0070.01016.61
7.4.200.0070.00016.62
7.4.160.0090.01216.59
7.4.150.0040.01417.40
7.4.140.0110.00617.86
7.4.130.0050.01116.62
7.4.120.0100.00816.41
7.4.110.0130.00316.48
7.4.100.0140.00716.63
7.4.90.0090.00916.53
7.4.80.0110.00719.39
7.4.70.0170.00416.73
7.4.60.0070.01016.50
7.4.50.0000.01116.47
7.4.40.0070.01016.50
7.4.30.0100.01216.61
7.4.10.0110.00714.72
7.4.00.0100.00414.66
7.3.330.0090.00013.44
7.3.320.0050.00013.30
7.3.310.0070.00016.41
7.3.300.0060.00016.20
7.3.290.0110.00516.28
7.3.280.0050.01316.29
7.3.270.0120.00617.40
7.3.260.0070.01016.45
7.3.250.0060.01116.36
7.3.240.0140.00316.66
7.3.230.0100.00716.40
7.3.210.0120.00616.61
7.3.200.0090.01519.39
7.3.190.0140.00316.52
7.3.180.0130.00716.46
7.3.170.0160.00616.38
7.3.160.0080.00816.52
7.3.130.0070.01114.81
7.3.120.0070.01014.63
7.3.110.0070.01114.99
7.3.100.0000.01414.47
7.3.90.0030.01214.81
7.3.80.0040.00714.96
7.3.70.0070.00714.87
7.3.60.0030.01214.76
7.3.50.0070.00714.73
7.3.40.0000.01314.72
7.3.30.0060.00914.89
7.3.20.0100.00316.65
7.3.10.0060.00516.58
7.3.00.0070.00516.78
7.2.330.0090.00916.69
7.2.320.0170.00016.90
7.2.310.0090.01516.65
7.2.300.0060.01616.78
7.2.290.0040.01916.59
7.2.260.0070.01015.20
7.2.250.0030.01415.23
7.2.240.0030.01015.11
7.2.230.0060.00915.27
7.2.220.0030.00915.34
7.2.210.0000.01215.07
7.2.200.0100.00715.00
7.2.190.0070.01015.06
7.2.180.0060.00315.23
7.2.170.0070.00715.02
7.2.160.0030.00614.91
7.2.150.0070.00317.09
7.2.140.0100.00717.02
7.2.130.0060.00816.95
7.2.120.0050.00916.75
7.2.110.0030.01017.04
7.2.100.0050.01116.79
7.2.90.0060.00516.98
7.2.80.0070.00416.96
7.2.70.0080.00916.74
7.2.60.0070.00716.79
7.2.50.0030.01017.07
7.2.40.0050.01216.76
7.2.30.0050.01016.92
7.2.20.0040.00916.88
7.2.10.0080.00716.96
7.2.00.0090.00617.89
7.1.330.0040.00815.79
7.1.320.0040.01415.82
7.1.310.0090.00315.57
7.1.300.0060.00915.61
7.1.290.0030.01015.98
7.1.280.0000.01015.51
7.1.270.0070.00415.73
7.1.260.0040.01115.85
7.1.250.0040.00615.74
7.1.240.0060.00515.81
7.1.230.0050.00715.77
7.1.220.0080.00615.73
7.1.210.0070.00715.84
7.1.200.0020.01115.79
7.1.190.0090.00415.74
7.1.180.0050.00515.68
7.1.170.0030.00915.71
7.1.160.0050.00515.71
7.1.150.0020.01215.79
7.1.140.0030.00715.88
7.1.130.0040.01115.82
7.1.120.0090.00315.78
7.1.110.0040.00715.83
7.1.100.0050.00616.61
7.1.90.0030.00915.86
7.1.80.0010.01015.79
7.1.70.0070.00716.18
7.1.60.0090.00817.04
7.1.50.0050.01016.20
7.1.40.0050.00815.72
7.1.30.0030.00815.67
7.1.20.0090.00515.76
7.1.10.0020.01015.65
7.1.00.0060.03017.98
7.0.330.0050.00815.38
7.0.320.0020.01015.32
7.0.310.0030.00915.34
7.0.300.0040.00815.45
7.0.290.0030.00715.39
7.0.280.0030.01115.50
7.0.270.0090.00415.36
7.0.260.0020.01415.56
7.0.250.0100.00315.34
7.0.240.0050.00715.53
7.0.230.0050.00815.47
7.0.220.0070.00515.39
7.0.210.0050.00915.32
7.0.200.0100.00415.95
7.0.190.0040.01015.36
7.0.180.0110.00515.51
7.0.170.0050.00815.40
7.0.160.0080.00715.30
7.0.150.0050.00615.25
7.0.140.0030.02917.65
7.0.130.0020.01215.29
7.0.120.0060.00615.44
7.0.110.0070.00515.37
7.0.100.0030.00715.43
7.0.90.0070.00415.48
7.0.80.0030.00815.34
7.0.70.0060.03417.36
7.0.60.0040.02017.56
7.0.50.0070.02617.70
7.0.40.0070.03215.74
7.0.30.0070.03115.49
7.0.20.0060.03015.64
7.0.10.0050.02015.64
7.0.00.0080.01815.76
5.6.400.0100.00314.40
5.6.390.0050.00514.69
5.6.380.0070.00314.34
5.6.370.0080.00414.34
5.6.360.0050.00814.46
5.6.350.0080.00714.46
5.6.340.0110.00414.48
5.6.330.0080.00314.34
5.6.320.0080.00814.20
5.6.310.0060.01014.35
5.6.300.0070.00814.10
5.6.290.0050.00814.42
5.6.280.0040.03016.44
5.6.270.0040.00814.50
5.6.260.0070.00614.38
5.6.250.0050.00514.43
5.6.240.0040.00414.28
5.6.230.0040.00814.49
5.6.220.0070.02416.43
5.6.210.0020.02216.40
5.6.200.0120.02816.54
5.6.190.0050.02316.74
5.6.180.0060.02716.69
5.6.170.0060.02716.67
5.6.160.0050.02616.50
5.6.150.0040.01916.52
5.6.140.0010.02616.53
5.6.130.0050.03216.74
5.6.120.0060.02816.69
5.6.110.0090.02316.60
5.6.100.0040.03216.67
5.6.90.0040.03516.49
5.6.80.0070.01716.34
5.6.70.0040.03016.34
5.6.60.0060.02516.34
5.6.50.0020.02416.38
5.6.40.0070.02716.39
5.6.30.0090.02816.28
5.6.20.0060.03316.40
5.6.10.0070.02716.42
5.6.00.0060.03116.35
5.5.380.0040.01112.96
5.5.370.0050.00713.12
5.5.360.0040.02515.43
5.5.350.0050.02815.40
5.5.340.0040.03315.54
5.5.330.0080.02215.48
5.5.320.0060.02815.56
5.5.310.0080.02815.65
5.5.300.0060.03215.62
5.5.290.0060.01715.63
5.5.280.0110.02615.66
5.5.270.0060.03115.45
5.5.260.0050.03215.60
5.5.250.0040.02615.51
5.5.240.0060.02915.35
5.5.230.0060.03115.33
5.5.220.0090.02115.35
5.5.210.0080.02915.34
5.5.200.0060.01715.39
5.5.190.0060.02915.36
5.5.180.0070.03115.31
5.5.170.0000.01312.96
5.5.160.0080.02415.42
5.5.150.0080.02715.40
5.5.140.0050.03415.38
5.5.130.0050.02915.41
5.5.120.0060.02215.43
5.5.110.0090.02615.31
5.5.100.0030.03115.29
5.5.90.0060.02915.30
5.5.80.0030.03415.25
5.5.70.0040.02615.38
5.5.60.0010.03315.34
5.5.50.0070.02915.26
5.5.40.0050.03415.28
5.5.30.0060.03015.13
5.5.20.0050.03115.32
5.5.10.0060.03015.37
5.5.00.0080.02315.38
5.4.450.0050.01614.36
5.4.440.0020.02214.39
5.4.430.0000.03214.37
5.4.420.0010.03414.38
5.4.410.0040.02514.31
5.4.400.0060.02414.28
5.4.390.0020.02314.23
5.4.380.0040.03014.25
5.4.370.0050.02814.24
5.4.360.0040.02114.25
5.4.350.0070.02714.19
5.4.340.0050.03014.22
5.4.330.0060.00311.85
5.4.320.0030.03114.31
5.4.310.0030.03314.27
5.4.300.0060.02314.25
5.4.290.0040.02014.29
5.4.280.0070.02614.31
5.4.270.0070.02614.25
5.4.260.0050.02914.20
5.4.250.0040.02514.24
5.4.240.0030.03214.27
5.4.230.0020.03014.28
5.4.220.0030.03214.25
5.4.210.0040.02514.19
5.4.200.0050.03114.28
5.4.190.0050.02714.18
5.4.180.0020.02314.29
5.4.170.0080.02814.31
5.4.160.0040.02514.24
5.4.150.0060.02814.27
5.4.140.0040.02613.37
5.4.130.0040.02913.38
5.4.120.0000.02213.36
5.4.110.0050.01913.42
5.4.100.0040.02413.39
5.4.90.0040.02113.42
5.4.80.0040.02613.42
5.4.70.0020.02813.38
5.4.60.0030.02813.39
5.4.50.0020.03013.35
5.4.40.0060.02513.35
5.4.30.0030.01713.36
5.4.20.0030.03013.39
5.4.10.0030.03113.39
5.4.00.0040.02413.19
5.3.290.0060.04013.15
5.3.280.0020.04013.13
5.3.270.0000.04313.19
5.3.260.0020.04113.18
5.3.250.0030.04013.11
5.3.240.0030.03613.08
5.3.230.0060.03513.15
5.3.220.0050.03013.12
5.3.210.0030.04113.07
5.3.200.0030.04013.11
5.3.190.0030.04013.10
5.3.180.0020.03413.15
5.3.170.0080.03713.16
5.3.160.0030.04213.10
5.3.150.0050.04213.08
5.3.140.0000.04513.11
5.3.130.0050.04013.12
5.3.120.0050.04313.08
5.3.110.0070.04013.11
5.3.100.0020.03712.85
5.3.90.0030.03812.88
5.3.80.0030.03812.86
5.3.70.0040.03712.86
5.3.60.0050.03512.83
5.3.50.0050.03812.81
5.3.40.0030.03412.76
5.3.30.0050.03512.78
5.3.20.0030.03412.68
5.3.10.0030.04112.70
5.3.00.0020.02812.67
5.2.170.0050.03212.03
5.2.160.0050.03212.03
5.2.150.0020.03212.03
5.2.140.0070.02812.03
5.2.130.0030.02812.03
5.2.120.0040.03212.03
5.2.110.0030.03312.03
5.2.100.0070.02212.03
5.2.90.0030.03512.03
5.2.80.0030.03012.03
5.2.70.0030.03312.03
5.2.60.0040.03012.03
5.2.50.0050.02912.03
5.2.40.0000.02912.03
5.2.30.0070.02512.03
5.2.20.0050.03312.03
5.2.10.0090.03012.03
5.2.00.0030.03312.03
5.1.60.0020.03012.03
5.1.50.0030.03112.03
5.1.40.0020.02912.03
5.1.30.0010.02912.03
5.1.20.0040.02312.03
5.1.10.0000.03312.03
5.1.00.0040.02212.03
5.0.50.0020.01512.03
5.0.40.0060.02212.03
5.0.30.0020.03012.03
5.0.20.0030.02212.03
5.0.10.0030.02312.03
5.0.00.0020.03712.03
4.4.90.0030.01812.03
4.4.80.0020.01612.03
4.4.70.0030.02012.03
4.4.60.0000.01812.03
4.4.50.0020.01712.03
4.4.40.0030.02012.03
4.4.30.0000.02012.03
4.4.20.0030.01212.03
4.4.10.0020.01212.03
4.4.00.0020.02812.03
4.3.110.0000.02112.03
4.3.100.0020.01712.03
4.3.90.0020.02012.03
4.3.80.0000.03112.03
4.3.70.0000.01712.03
4.3.60.0060.01512.03
4.3.50.0050.01312.03
4.3.40.0000.03012.03
4.3.30.0010.02112.03
4.3.20.0020.02012.03
4.3.10.0030.02012.03
4.3.00.0000.02112.03

preferences:
43.21 ms | 401 KiB | 5 Q