3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abc = array( 'rec_1' => array('fn'=>'Aron','ln'=>'Michaels'), '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 strcmp($a[$key], $b[$key]); }; }*/ function sortit($a, $b , $key) { return strcmp($a[$key], $b[$key]); }; function mysort($key) { return sortit($a,$b,$key); } //usort($abc, build_sorter('ln')); usort($abc, mysort('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.01118.33
8.3.50.0090.01122.72
8.3.40.0070.00718.86
8.3.30.0110.00419.22
8.3.20.0040.00420.29
8.3.10.0090.00021.95
8.3.00.0000.00819.69
8.2.180.0140.00718.52
8.2.170.0080.00822.96
8.2.160.0100.00320.35
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0060.00319.31
8.2.110.0070.00320.56
8.2.100.0070.00417.91
8.2.90.0060.00317.75
8.2.80.0060.00318.03
8.2.70.0060.00318.04
8.2.60.0040.00417.93
8.2.50.0000.00818.10
8.2.40.0000.00720.46
8.2.30.0030.00519.52
8.2.20.0040.00417.77
8.2.10.0020.00518.09
8.2.00.0040.00417.73
8.1.280.0040.01125.92
8.1.270.0080.00022.20
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0030.00720.90
8.1.230.0100.00419.08
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0080.00317.23
8.1.190.0040.00417.23
8.1.180.0000.00718.10
8.1.170.0090.00018.55
8.1.160.0030.00618.78
8.1.150.0060.00318.84
8.1.140.0040.00417.41
8.1.130.0000.00717.76
8.1.120.0000.00717.34
8.1.110.0040.00417.40
8.1.100.0040.00417.42
8.1.90.0040.00417.42
8.1.80.0000.00817.33
8.1.70.0000.00717.27
8.1.60.0030.00617.56
8.1.50.0040.00417.59
8.1.40.0000.00817.53
8.1.30.0080.00017.63
8.1.20.0000.00817.73
8.1.10.0050.00217.62
8.1.00.0050.00317.46
8.0.300.0040.00419.71
8.0.290.0070.00316.63
8.0.280.0000.00718.41
8.0.270.0000.00717.20
8.0.260.0000.00617.17
8.0.250.0040.00416.96
8.0.240.0030.00316.89
8.0.230.0030.00316.92
8.0.220.0000.00716.77
8.0.210.0030.00516.88
8.0.200.0030.00317.00
8.0.190.0000.00716.91
8.0.180.0070.00016.89
8.0.170.0040.00417.00
8.0.160.0070.00016.95
8.0.150.0030.00516.90
8.0.140.0000.00716.91
8.0.130.0030.00313.34
8.0.120.0060.00316.71
8.0.110.0030.00516.86
8.0.100.0030.00316.93
8.0.90.0050.00216.96
8.0.80.0060.00916.90
8.0.70.0040.00416.85
8.0.60.0040.00416.89
8.0.50.0080.00016.91
8.0.30.0070.01217.20
8.0.20.0070.01217.40
8.0.10.0050.00216.91
8.0.00.0120.00816.83
7.4.330.0030.00315.03
7.4.320.0060.00016.52
7.4.300.0060.00016.63
7.4.290.0040.00416.63
7.4.280.0000.00816.58
7.4.270.0030.00316.61
7.4.260.0080.00416.41
7.4.250.0040.00416.50
7.4.240.0060.00116.54
7.4.230.0070.00016.64
7.4.220.0030.01516.72
7.4.210.0100.00316.54
7.4.200.0040.00416.52
7.4.160.0120.00816.58
7.4.150.0090.00917.40
7.4.140.0050.01417.86
7.4.130.0140.00416.54
7.4.120.0140.00616.59
7.4.110.0040.01316.46
7.4.100.0130.01016.55
7.4.90.0130.01016.77
7.4.80.0060.01219.39
7.4.70.0070.01016.59
7.4.60.0070.00916.40
7.4.50.0030.01216.41
7.4.40.0000.02116.09
7.4.30.0060.01016.38
7.4.20.0090.00916.13
7.4.10.0130.00316.21
7.4.00.0060.00915.89
7.3.330.0030.00513.45
7.3.320.0020.00213.31
7.3.310.0000.00716.48
7.3.300.0030.00316.46
7.3.290.0110.00816.36
7.3.280.0110.00916.35
7.3.270.0160.00317.40
7.3.260.0120.01116.61
7.3.250.0100.00916.52
7.3.240.0090.00616.34
7.3.230.0100.01016.42
7.3.210.0040.01216.52
7.3.200.0100.01019.39
7.3.190.0070.01016.37
7.3.180.0060.01216.36
7.3.170.0120.00616.47
7.3.160.0100.01016.32
7.3.150.0100.00716.27
7.3.140.0110.00416.30
7.3.130.0080.00816.13
7.3.120.0030.01216.30
7.3.110.0140.00716.37
7.3.100.0120.00916.33
7.3.90.0060.01316.36
7.3.80.0090.00916.30
7.3.70.0130.00316.13
7.3.60.0120.00616.23
7.3.50.0180.00016.15
7.3.40.0110.00816.22
7.3.30.0100.00716.08
7.3.20.0180.00016.26
7.3.10.0080.00816.14
7.3.00.0100.00616.16
7.2.330.0230.01216.48
7.2.320.0090.00916.47
7.2.310.0110.00616.35
7.2.300.0100.00716.55
7.2.290.0040.01716.50
7.2.280.0060.01016.34
7.2.270.0030.01516.33
7.2.260.0150.00016.49
7.2.250.0070.01316.54
7.2.240.0090.01316.44
7.2.230.0150.00616.39
7.2.220.0100.00616.14
7.2.210.0130.00416.35
7.2.200.0070.01116.53
7.2.190.0060.01016.37
7.2.180.0070.01016.32
7.2.170.0120.00616.35
7.2.160.0120.00516.41
7.2.150.0120.00716.46
7.2.140.0150.01216.45
7.2.130.0090.00816.44
7.2.120.0130.00316.43
7.2.110.0100.00616.29
7.2.100.0120.00616.32
7.2.90.0090.00916.32
7.2.80.0140.00716.30
7.2.70.0190.00316.58
7.2.60.0110.01116.37
7.2.50.0210.00316.34
7.2.40.0120.00616.56
7.2.30.0080.01116.38
7.2.20.0100.00716.38
7.2.10.0000.01816.52
7.2.00.0060.01118.05
7.1.330.0060.01415.47
7.1.320.0130.00315.36
7.1.310.0140.00315.41
7.1.300.0120.00615.30
7.1.290.0030.01415.33
7.1.280.0060.01315.56
7.1.270.0070.01015.22
7.1.260.0030.01315.48
7.1.250.0120.00615.44
7.1.240.0040.01315.45
7.1.230.0100.00715.25
7.1.220.0100.00715.37
7.1.210.0120.00915.25
7.1.200.0060.00715.55
7.1.190.0140.00415.38
7.1.180.0120.00815.40
7.1.170.0090.00915.33
7.1.160.0030.01415.30
7.1.150.0170.00415.27
7.1.140.0090.00615.43
7.1.130.0090.00615.50
7.1.120.0030.01315.56
7.1.110.0080.00815.29
7.1.100.0060.01016.62
7.1.90.0120.00615.55
7.1.80.0080.00815.54
7.1.70.0080.00416.19
7.1.60.0120.00817.42
7.1.50.0120.00716.30
7.1.40.0100.00715.43
7.1.30.0030.01215.50
7.1.20.0100.00715.48
7.1.10.0100.00515.36
7.1.00.0080.04018.87
7.0.330.0000.01514.88
7.0.320.0100.01015.16
7.0.310.0070.01115.04
7.0.300.0030.01614.97
7.0.290.0080.00815.13
7.0.280.0060.00915.06
7.0.270.0140.00315.21
7.0.260.0070.00715.28
7.0.250.0030.01315.06
7.0.240.0080.00815.03
7.0.230.0120.00915.02
7.0.220.0030.01314.90
7.0.210.0060.01014.96
7.0.200.0050.00816.02
7.0.190.0070.01014.88
7.0.180.0080.00815.06
7.0.170.0110.00515.17
7.0.160.0060.00914.98
7.0.150.0060.00915.19
7.0.140.0030.02818.69
7.0.130.0060.00914.95
7.0.120.0120.00814.79
7.0.110.0080.01215.11
7.0.100.0190.00315.27
7.0.90.0080.00715.33
7.0.80.0060.01015.25
7.0.70.0050.01115.04
7.0.60.0110.04217.42
7.0.50.0070.02416.50
7.0.40.0060.04817.74
7.0.30.0180.02917.68
7.0.20.0140.02517.59
7.0.10.0150.02317.67
7.0.00.0050.02517.70
5.6.400.0110.00715.94
5.6.390.0070.01015.71
5.6.380.0000.01715.46
5.6.370.0090.01215.69
5.6.360.0100.01015.81
5.6.350.0120.00615.70
5.6.340.0070.01016.02
5.6.330.0090.00915.59
5.6.320.0130.00416.08
5.6.310.0080.00815.82
5.6.300.0120.00615.75
5.6.290.0040.01415.66
5.6.280.0060.04318.39
5.6.270.0110.00815.71
5.6.260.0150.00915.79
5.6.250.0070.01715.98
5.6.240.0000.02315.83
5.6.230.0110.00616.04
5.6.220.0040.01515.81
5.6.210.0080.04418.25
5.6.200.0090.02316.95
5.6.190.0030.03118.14
5.6.180.0080.04118.26
5.6.170.0110.02918.19
5.6.160.0060.02518.12
5.6.150.0030.03016.91
5.6.140.0070.03017.02
5.6.130.0130.04417.07
5.6.120.0150.03118.54
5.6.110.0050.03018.42
5.6.100.0140.03718.51
5.6.90.0060.04718.36
5.6.80.0100.03018.10
5.6.70.2180.02318.16
5.6.60.0060.01015.67
5.6.50.0030.01315.65
5.6.40.0060.00915.97
5.6.30.0070.01015.88
5.6.20.0140.00315.90
5.6.10.0000.01715.83
5.6.00.0130.00315.75
5.5.380.0060.01215.65
5.5.370.0060.01215.81
5.5.360.0080.01115.66
5.5.350.0080.03818.05
5.5.340.0060.04616.80
5.5.330.0100.02118.21
5.5.320.0300.03518.08
5.5.310.0200.03517.94
5.5.300.0060.02416.93
5.5.290.0080.02816.88
5.5.280.0130.04418.35
5.5.270.0010.03418.25
5.5.260.0130.04418.24
5.5.250.0080.02318.17
5.5.240.0070.04318.05
5.5.230.0040.01215.81
5.5.220.0120.00415.63
5.5.210.0160.00015.96
5.5.200.0080.00815.79
5.5.190.0040.01415.98
5.5.180.0100.00715.75
5.5.170.0100.00715.77
5.5.160.0120.00615.66
5.5.150.0120.00815.52
5.5.140.0160.00415.88
5.5.130.0120.00615.75
5.5.120.0050.01315.59
5.5.110.0110.01115.69
5.5.100.0090.01515.75
5.5.90.0120.00615.52
5.5.80.0130.01015.42
5.5.70.0080.01515.92
5.5.60.0030.01715.81
5.5.50.0130.00915.83
5.5.40.0060.01615.89
5.5.30.0090.00915.88
5.5.20.0090.00815.88
5.5.10.0070.01015.89
5.5.00.0110.01115.68
5.4.450.0170.01816.05
5.4.440.0150.02215.99
5.4.430.0170.01815.86
5.4.420.0110.04016.03
5.4.410.0050.03615.95
5.4.400.0050.03415.65
5.4.390.0110.02815.54
5.4.380.0060.03115.55
5.4.370.0050.04115.67
5.4.360.0150.02315.68
5.4.350.0050.02313.21
5.4.340.0070.02213.18
5.4.330.0140.00012.63
5.4.320.0100.02713.38
5.4.310.0170.02113.49
5.4.300.0100.02613.38
5.4.290.0100.02513.53
5.4.280.0190.01513.44
5.4.270.0150.02213.49
5.4.260.0100.02513.37
5.4.250.0050.02413.36
5.4.240.0050.02513.45
5.4.230.0130.01813.38
5.4.220.0080.02313.32
5.4.210.0110.02713.29
5.4.200.0050.02513.37
5.4.190.0110.01913.37
5.4.180.0070.02413.50
5.4.170.0120.02013.60
5.4.160.0070.02713.42
5.4.150.0050.02413.45
5.4.140.0040.02413.29
5.4.130.0120.01713.30
5.4.120.0070.02413.33
5.4.110.0000.02813.26
5.4.100.0110.02113.26
5.4.90.0110.01913.20
5.4.80.0130.01713.27
5.4.70.0020.02513.25
5.4.60.0090.02413.25
5.4.50.0060.02213.33
5.4.40.0050.02413.21
5.4.30.0030.02513.26
5.4.20.0080.02213.31
5.4.10.0050.02313.25
5.4.00.0090.02012.96
5.3.290.0030.02613.94
5.3.280.0070.02313.79
5.3.270.0030.02713.89
5.3.260.0050.02713.78
5.3.250.0050.02313.78
5.3.240.0050.02413.96
5.3.230.0050.02513.87
5.3.220.0070.02313.73
5.3.210.0100.02013.97
5.3.200.0070.02313.73
5.3.190.0030.03013.79
5.3.180.0050.02413.88
5.3.170.0040.02513.92
5.3.160.0080.02513.84
5.3.150.0040.02513.98
5.3.140.0050.02313.90
5.3.130.0060.02713.88
5.3.120.0070.02313.86
5.3.110.0050.03113.97
5.3.100.0120.01813.62
5.3.90.0050.02413.64
5.3.80.0070.03113.60
5.3.70.0190.01813.49
5.3.60.0070.02313.60
5.3.50.0030.02813.55
5.3.40.0070.02813.55
5.3.30.0070.02313.49
5.3.20.0100.02213.46
5.3.10.0050.02313.34
5.3.00.0070.02313.24
5.2.170.0090.02011.67
5.2.160.0120.01311.57
5.2.150.0040.02111.60
5.2.140.0090.01711.54
5.2.130.0070.01711.62
5.2.120.0110.01311.60
5.2.110.0070.01711.57
5.2.100.0080.01711.56
5.2.90.0050.02611.52
5.2.80.0110.02311.53
5.2.70.0110.01611.54
5.2.60.0030.02211.49
5.2.50.0050.02211.54
5.2.40.0120.01811.49
5.2.30.0020.02411.50
5.2.20.0080.01811.39
5.2.10.0030.02211.35
5.2.00.0040.02611.15
5.1.60.0050.02210.63
5.1.50.0070.02010.54
5.1.40.0030.01810.47
5.1.30.0060.01710.98
5.1.20.0070.02010.71
5.1.10.0070.01610.54
5.1.00.0050.01610.58
5.0.50.0030.0139.36
5.0.40.0030.0149.29
5.0.30.0000.0229.15
5.0.20.0060.0119.13
5.0.10.0000.0169.24
5.0.00.0050.0169.22
4.4.90.0050.0088.01
4.4.80.0050.0108.00
4.4.70.0030.0108.00
4.4.60.0030.0098.01
4.4.50.0040.0108.01
4.4.40.0020.0167.99
4.4.30.0030.0088.07
4.4.20.0010.0118.08
4.4.10.0010.0108.04
4.4.00.0030.0158.00
4.3.110.0030.0088.01
4.3.100.0000.0117.97
4.3.90.0000.0117.96
4.3.80.0020.0147.95
4.3.70.0030.0087.95
4.3.60.0020.0107.96
4.3.50.0020.0127.96
4.3.40.0030.0137.95
4.3.30.0030.0087.34
4.3.20.0030.0107.34
4.3.10.0010.0107.32
4.3.00.0060.00713.40

preferences:
49.92 ms | 401 KiB | 5 Q