3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[ { "id": "1", "country_id": "1", "spec_id": "1", "spec_children_name": "SUPER REDUCES RATE", "spec_children_first_col": "", "spec_children_second_col": "", "spec_children_third_col": "" }, { "id": "2", "country_id": "1", "spec_id": "1", "spec_children_name": "REDUCED RATE", "spec_children_first_col": "10% and 13%", "spec_children_second_col": "food, passenger transport, accommodotion, newspaper, pharmaceutical products,\u2026.(10%); plants, antiques, firewood, cinema, theatre,\u2026(13%)", "spec_children_third_col": "" }, { "id": "3", "country_id": "1", "spec_id": "1", "spec_children_name": "MEDIUM RATE", "spec_children_first_col": "", "spec_children_second_col": "", "spec_children_third_col": "" }, { "id": "4", "country_id": "1", "spec_id": "1", "spec_children_name": "STANDARD RATE", "spec_children_first_col": "20%", "spec_children_second_col": "other", "spec_children_third_col": "" }, { "id": "5", "country_id": "1", "spec_id": "1", "spec_children_name": "ZERO RATE", "spec_children_first_col": "", "spec_children_second_col": "", "spec_children_third_col": "" }, { "id": "104", "country_id": "2", "spec_id": "1", "spec_children_name": "REDUCED RATE", "spec_children_first_col": "TEXT 547", "spec_children_second_col": "TEXT 1000", "spec_children_third_col": "" } ]'; $objects = json_decode($json); $column = 'spec_children_name'; $direction = 'asc'; $reverser = $direction === 'asc' ? 1 : -1; uasort($objects, function($a, $b) use ($column, $reverser) { return $reverser * ($a->$column <=> $b->$column); }); var_export($objects);

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.4.140.0100.01217.53
8.4.130.0120.00917.84
8.4.120.0110.01020.43
8.4.110.0130.00722.40
8.4.100.0130.00917.71
8.4.90.0110.01218.74
8.4.80.0090.01017.80
8.4.70.0110.01017.98
8.4.60.0120.00718.96
8.4.50.0080.00917.79
8.4.40.0000.01017.79
8.4.30.0060.00320.43
8.4.20.0040.00417.90
8.4.10.0150.00617.89
8.3.270.0150.01016.39
8.3.260.0120.00816.61
8.3.250.0090.01018.67
8.3.240.0060.01116.58
8.3.230.0070.01116.61
8.3.220.0070.01218.91
8.3.210.0100.00818.41
8.3.200.0070.00216.57
8.3.190.0050.00318.87
8.3.180.0080.00318.42
8.3.170.0140.00419.18
8.3.160.0030.00616.49
8.3.150.0180.00018.75
8.3.140.0030.01516.46
8.3.130.0080.01218.51
8.3.120.0060.00319.05
8.3.110.0080.00020.94
8.3.100.0060.00924.06
8.3.90.0040.01126.77
8.3.80.0090.00019.36
8.3.70.0120.00616.50
8.3.60.0090.00618.05
8.3.50.0070.01123.71
8.3.40.0070.00718.71
8.3.30.0110.00718.71
8.3.20.0040.00423.70
8.3.10.0000.00821.80
8.3.00.0070.00021.73
8.2.290.0040.00420.54
8.2.280.0120.00918.53
8.2.270.0110.00716.94
8.2.260.0000.00718.27
8.2.250.0040.00416.63
8.2.240.0060.00318.63
8.2.230.0030.00622.58
8.2.220.0060.00337.54
8.2.210.0120.00626.77
8.2.200.0090.00018.88
8.2.190.0070.00716.58
8.2.180.0110.00718.16
8.2.170.0120.00922.96
8.2.160.0040.01120.45
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00026.16
8.2.110.0030.00622.13
8.2.100.0090.00317.78
8.2.90.0000.00817.91
8.2.80.0000.00819.15
8.2.70.0030.00517.63
8.2.60.0060.00317.50
8.2.50.0080.00018.04
8.2.40.0030.00519.88
8.2.30.0000.00719.39
8.2.20.0080.00018.01
8.2.10.0030.00619.33
8.2.00.0040.00419.21
8.1.330.0090.00621.91
8.1.320.0040.00315.82
8.1.310.0030.00518.56
8.1.300.0000.00918.54
8.1.290.0060.00330.84
8.1.280.0100.01025.92
8.1.270.0040.00422.05
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0060.00322.14
8.1.230.0070.00422.66
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0040.00417.25
8.1.180.0080.00018.10
8.1.170.0080.00017.62
8.1.160.0000.00718.91
8.1.150.0050.00518.88
8.1.140.0050.00320.79
8.1.130.0030.00320.30
8.1.120.0040.00417.48
8.1.110.0040.00417.45
8.1.100.0070.00017.48
8.1.90.0070.00017.46
8.1.80.0000.00817.48
8.1.70.0030.00317.45
8.1.60.0050.00317.52
8.1.50.0040.00417.45
8.1.40.0050.00317.54
8.1.30.0000.00817.65
8.1.20.0040.00417.63
8.1.10.0080.00017.45
8.1.00.0040.00417.52
8.0.300.0000.00820.09
8.0.290.0040.00416.88
8.0.280.0070.00018.36
8.0.270.0000.00718.02
8.0.260.0000.00720.01
8.0.250.0070.00017.08
8.0.240.0000.00716.92
8.0.230.0040.00417.01
8.0.220.0000.00716.95
8.0.210.0070.00017.05
8.0.200.0050.00216.88
8.0.190.0040.00417.00
8.0.180.0040.00416.97
8.0.170.0060.00316.96
8.0.160.0040.00416.81
8.0.150.0070.00316.93
8.0.140.0040.00416.79
8.0.130.0070.00013.44
8.0.120.0080.00016.82
8.0.110.0000.00716.79
8.0.100.0050.00316.95
8.0.90.0080.00016.91
8.0.80.0080.00616.82
8.0.70.0040.00416.73
8.0.60.0000.00716.80
8.0.50.0040.00416.97
8.0.30.0080.00816.96
8.0.20.0120.00617.38
8.0.10.0040.00416.96
8.0.00.0110.00716.82
7.4.330.0070.00016.77
7.4.320.0030.00316.47
7.4.300.0030.00316.52
7.4.290.0070.00016.63
7.4.280.0040.00416.43
7.4.270.0030.00316.60
7.4.260.0000.00613.30
7.4.250.0030.00316.52
7.4.240.0050.00316.65
7.4.230.0050.00316.62
7.4.220.0000.00716.59
7.4.210.0100.00416.57
7.4.200.0000.00716.74
7.4.130.0140.01016.61
7.4.120.0090.00916.70
7.4.110.0120.00416.69
7.4.100.0120.00616.51
7.4.90.0110.00616.55
7.4.80.0170.00319.39
7.4.70.0070.01016.62
7.4.60.0130.00516.50
7.4.50.0050.00516.67
7.4.40.0070.01016.56
7.4.20.0090.00616.59
7.4.10.0120.00316.48
7.4.00.0100.00516.63
7.3.330.0030.00316.30
7.3.320.0000.00713.18
7.3.310.0000.00816.22
7.3.300.0000.00616.39
7.3.290.0100.00416.33
7.3.260.0070.01016.56
7.3.240.0060.01116.47
7.3.230.0120.00616.41
7.3.210.0070.01016.62
7.3.200.0090.01316.39
7.3.190.0120.00616.64
7.3.180.0110.00716.45
7.3.170.0040.01416.64
7.3.160.0120.00916.50
7.3.130.0120.00316.30
7.3.120.0040.01116.20
7.3.110.0040.01116.39
7.3.100.0110.00416.30
7.3.90.0040.01416.38
7.3.80.0040.01116.31
7.3.70.0000.01416.38
7.3.60.0040.01116.52
7.3.50.0070.00716.34
7.3.40.0030.01216.45
7.3.30.0090.00616.44
7.3.20.0030.01216.60
7.3.10.0120.00616.48
7.3.00.0090.00616.17
7.2.330.0080.00916.72
7.2.320.0060.01216.45
7.2.310.0070.01016.46
7.2.300.0140.01016.57
7.2.290.0070.01116.45
7.2.260.0120.00316.54
7.2.250.0050.01016.79
7.2.240.0090.00916.76
7.2.230.0120.00316.44
7.2.220.0100.01016.52
7.2.210.0140.00416.42
7.2.200.0040.01116.52
7.2.190.0070.00716.50
7.2.180.0070.00716.69
7.2.170.0090.00616.55
7.2.160.0030.01216.76
7.2.150.0070.01116.77
7.2.140.0100.00716.68
7.2.130.0130.00716.62
7.2.120.0030.01216.38
7.2.110.0070.01016.69
7.2.100.0090.00616.50
7.2.90.0100.01016.73
7.2.80.0030.01516.59
7.2.70.0100.00616.41
7.2.60.0070.01316.68
7.2.50.0140.00416.42
7.2.40.0100.00716.64
7.2.30.0160.00016.73
7.2.20.0080.00816.59
7.2.10.0090.00616.76
7.2.00.0060.01016.56

preferences:
31.05 ms | 403 KiB | 5 Q