3v4l.org

run code in 300+ PHP versions simultaneously
<?php $locations = Array( Array ( 'id' => 14, 'post_id' => 319, 'location' => 'Atlanta, GA', 'address' => '161 Racetrack Rd., McDonough', 'city' => 'Atlanta', 'state' => 'Georgia', 'state_code' =>'GA', 'country' => 'USA', 'zipcode' => 30253, 'service_zipcode' => '', 'phone' => '', 'fax' => '', 'email' => '', 'facebook' => '', 'twitter' => '', 'linkedin' => '', 'gplus' => '', 'latitude' => '', 'longitude' => '', 'url' => '', 'created_at' => '2019-04-22 07:22:55', 'updated_at' => '2019-04-22 07:26:31', ), Array ( 'id' => 16, 'post_id' => 321, 'location' => 'Augusta, Georigia', 'address' => '1446 Harper Street', 'city' => 'Augusta', 'state' => 'Georigia', 'state_code' => 'GA', 'country' => 'USA', 'zipcode' => '', 'service_zipcode' => '', 'phone' => '', 'fax' => '', 'email' => '', 'facebook' => '', 'twitter' => '', 'linkedin' => '', 'gplus' => '', 'latitude' => '', 'longitude' => '', 'url' => '', 'created_at' => '2019-04-22 07:29:33', 'updated_at' => '2019-04-22 07:32:25', ), Array ( 'id' => 16, 'post_id' => 321, 'location' => 'Augusta, Georigia', 'address' => '1446 Harper Street', 'city' => 'Huston', 'state' => 'Texas', 'state_code' => 'GA', 'country' => 'USA', 'zipcode' => '', 'service_zipcode' => '', 'phone' => '', 'fax' => '', 'email' => '', 'facebook' => '', 'twitter' => '', 'linkedin' => '', 'gplus' => '', 'latitude' => '', 'longitude' => '', 'url' => '', 'created_at' => '2019-04-22 07:29:33', 'updated_at' => '2019-04-22 07:32:25', ), Array ( 'id' => 12, 'post_id' => 317, 'location' => 'Savannah, Georgia', 'address' => '834 Northside Dr. East, Statesboro', 'city' => 'Savannah', 'state' => 'Georgia', 'state_code' => 'GA', 'country' => 'USA', 'zipcode' => 30458, 'service_zipcode' => '', 'phone' => '', 'fax' => '', 'email' => '', 'facebook' => '', 'twitter' => '', 'linkedin' => '', 'gplus' => '', 'latitude' => '', 'longitude' => '', 'url' => '', 'created_at' => '2019-04-22 07:15:43', 'updated_at' => '2019-04-22 07:18:11', ) ); $arr = array_column($locations, "state", "city"); asort($arr); $prev = null; foreach($arr as $city => $state){ if($state != $prev){ echo PHP_EOL . PHP_EOL . $state . PHP_EOL; $prev = $state; } echo "---" . $city . PHP_EOL; }

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.70.0110.00416.47
8.3.60.0060.01218.20
8.3.50.0130.00618.34
8.3.40.0070.01418.80
8.3.30.0140.00018.71
8.3.20.0040.00420.74
8.3.10.0040.00421.47
8.3.00.0040.00421.95
8.2.190.0110.00416.63
8.2.180.0110.00416.50
8.2.170.0180.00322.96
8.2.160.0060.00820.45
8.2.150.0050.00324.18
8.2.140.0070.00724.66
8.2.130.0040.00419.95
8.2.120.0050.00326.35
8.2.110.0000.00922.24
8.2.100.0080.00317.72
8.2.90.0000.00817.63
8.2.80.0080.00018.80
8.2.70.0040.00417.63
8.2.60.0080.00017.63
8.2.50.0040.00417.80
8.2.40.0000.00819.35
8.2.30.0080.00020.50
8.2.20.0000.00818.09
8.2.10.0070.00019.38
8.2.00.0040.00418.12
8.1.280.0120.00925.92
8.1.270.0040.00422.18
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00623.93
8.1.230.0070.00419.14
8.1.220.0080.00017.79
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00817.13
8.1.180.0030.00518.10
8.1.170.0080.00017.62
8.1.160.0050.00318.89
8.1.150.0000.00718.88
8.1.140.0040.00418.87
8.1.130.0030.00320.21
8.1.120.0000.00717.53
8.1.110.0050.00317.17
8.1.100.0020.00517.41
8.1.90.0090.00017.44
8.1.80.0000.00717.38
8.1.70.0030.00317.45
8.1.60.0040.00417.51
8.1.50.0020.00517.52
8.1.40.0050.00317.52
8.1.30.0050.00317.70
8.1.20.0080.00017.66
8.1.10.0060.00317.53
8.1.00.0080.00017.43
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0070.00017.25
8.0.260.0060.00018.44
8.0.250.0000.00717.07
8.0.240.0000.00717.06
8.0.230.0070.00016.90
8.0.220.0070.00016.98
8.0.210.0000.00716.84
8.0.200.0000.00716.82
8.0.190.0060.00316.98
8.0.180.0000.00816.95
8.0.170.0040.00416.97
8.0.160.0040.00416.94
8.0.150.0070.00316.83
8.0.140.0080.00016.80
8.0.130.0000.00513.29
8.0.120.0030.00616.89
8.0.110.0070.00016.82
8.0.100.0040.00416.94
8.0.90.0000.00716.70
8.0.80.0040.01116.83
8.0.70.0000.00716.76
8.0.60.0040.00416.93
8.0.50.0050.00316.77
8.0.30.0100.01017.20
8.0.20.0130.01017.00
8.0.10.0080.00017.01
8.0.00.0080.01016.83
7.4.330.0050.00016.83
7.4.320.0060.00016.58
7.4.300.0000.00616.61
7.4.290.0070.00016.60
7.4.280.0000.00716.41
7.4.270.0030.00316.49
7.4.260.0000.00716.50
7.4.250.0030.00316.48
7.4.240.0030.00316.53
7.4.230.0000.00716.35
7.4.220.0030.00516.66
7.4.210.0090.00616.57
7.4.200.0000.00716.61
7.4.160.0050.01116.60
7.4.130.0070.01116.56
7.4.120.0120.00816.62
7.4.110.0030.02216.63
7.4.100.0100.01316.55
7.4.90.0080.00816.43
7.4.80.0160.00019.39
7.4.70.0030.01616.50
7.4.60.0040.01216.69
7.4.50.0040.01116.56
7.4.40.0090.00616.51
7.4.00.0070.00714.94
7.3.330.0000.00513.13
7.3.320.0000.00513.25
7.3.310.0030.00316.40
7.3.300.0040.00416.34
7.3.290.0000.00716.23
7.3.280.0070.00916.30
7.3.260.0080.00916.47
7.3.240.0060.01116.40
7.3.230.0000.01616.59
7.3.210.0000.01716.62
7.3.200.0030.01316.51
7.3.190.0000.01616.33
7.3.180.0000.01716.32
7.3.170.0070.01016.55
7.3.160.0100.00716.66
7.3.40.0000.01314.86
7.3.30.0060.00614.57
7.3.20.0150.00616.61
7.3.10.0090.00316.65
7.3.00.0150.00616.62
7.2.330.0080.00816.35
7.2.320.0150.00616.69
7.2.310.0070.01416.77
7.2.300.0040.01416.50
7.2.290.0040.01716.53
7.2.170.0030.00814.93
7.2.160.0160.00615.07
7.2.150.0040.01817.00
7.2.140.0120.00816.90
7.2.130.0090.00516.71
7.2.120.0110.00916.91
7.2.110.0120.00816.66
7.2.100.0030.01116.88
7.2.90.0030.01816.99
7.2.80.0030.00716.98
7.2.70.0150.00617.00
7.2.60.0030.01216.65
7.2.50.0030.01917.02
7.2.40.0150.00616.74
7.2.30.0120.01216.75
7.2.20.0130.00016.83
7.2.10.0110.00017.01
7.2.00.0000.01316.99
7.1.280.0000.01015.56
7.1.270.0060.00615.58
7.1.260.0080.00415.74
7.1.250.0050.00515.94

preferences:
45.05 ms | 401 KiB | 5 Q