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' => 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', ) ); $hierarchy = []; if (! empty($locations)) { foreach ($locations as $location) { $hierarchy[$location['country']][$location['state']] = $location; } } if (! empty($hierarchy)) { foreach ($hierarchy as $country => $location) { echo "<br/>" . $country; if (! empty($hierarchy[$country])) { foreach ($hierarchy[$country] as $state => $city) { echo "<br/>--> " . $state; echo "<br/>----> " . $city['city']; } } } }

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.0120.00318.37
8.3.50.0090.00819.07
8.3.40.0000.01518.73
8.3.30.0090.00618.79
8.3.20.0080.00020.89
8.3.10.0040.00423.66
8.3.00.0030.00621.70
8.2.180.0040.01425.92
8.2.170.0130.00322.96
8.2.160.0110.00420.38
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00426.16
8.2.110.0090.00019.32
8.2.100.0040.00817.91
8.2.90.0040.00417.88
8.2.80.0080.00017.97
8.2.70.0050.00318.04
8.2.60.0080.00018.15
8.2.50.0000.00818.10
8.2.40.0000.00719.52
8.2.30.0060.00320.39
8.2.20.0060.00318.19
8.2.10.0070.00019.57
8.2.00.0030.00518.01
8.1.280.0090.00625.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0030.00622.13
8.1.230.0040.00720.91
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0040.00417.22
8.1.190.0030.00517.36
8.1.180.0040.00418.10
8.1.170.0060.00318.66
8.1.160.0040.00418.84
8.1.150.0040.00418.96
8.1.140.0000.00818.97
8.1.130.0070.00020.19
8.1.120.0050.00217.50
8.1.110.0040.00417.45
8.1.100.0030.00517.36
8.1.90.0000.00917.37
8.1.80.0000.00817.38
8.1.70.0070.00017.38
8.1.60.0040.00417.60
8.1.50.0000.00817.54
8.1.40.0090.00017.53
8.1.30.0030.00517.63
8.1.20.0030.00617.55
8.1.10.0000.00717.62
8.1.00.0040.00417.41
8.0.300.0000.00820.21
8.0.290.0020.00516.63
8.0.280.0000.00718.50
8.0.270.0040.00417.18
8.0.260.0000.00618.46
8.0.250.0000.00716.97
8.0.240.0030.00317.01
8.0.230.0040.00416.93
8.0.220.0040.00316.79
8.0.210.0000.00716.86
8.0.200.0070.00016.84
8.0.190.0080.00016.83
8.0.180.0070.00017.00
8.0.170.0080.00016.93
8.0.160.0000.00716.98
8.0.150.0080.00416.77
8.0.140.0030.00516.86
8.0.130.0050.00013.33
8.0.120.0040.00416.87
8.0.110.0040.00416.84
8.0.100.0040.00416.78
8.0.90.0040.00416.87
8.0.80.0090.01216.86
8.0.70.0000.00817.01
8.0.60.0000.00716.78
8.0.50.0080.00016.74
8.0.30.0110.00817.21
8.0.20.0080.01217.12
8.0.10.0050.00217.00
8.0.00.0110.00716.68
7.4.330.0050.00016.76
7.4.320.0060.00016.67
7.4.300.0040.00416.53
7.4.290.0000.00816.60
7.4.280.0040.00416.62
7.4.270.0000.00816.41
7.4.260.0000.00716.44
7.4.250.0000.00716.43
7.4.240.0000.00716.40
7.4.230.0070.00016.68
7.4.220.0000.00716.47
7.4.210.0050.01216.63
7.4.200.0000.00716.52
7.4.160.0120.00816.47
7.4.140.0080.01217.86
7.4.130.0090.01216.49
7.4.120.0130.00416.61
7.4.110.0110.00616.46
7.4.100.0120.00616.50
7.4.90.0100.00716.45
7.4.80.0080.00819.39
7.4.70.0100.00716.60
7.4.60.0100.00516.41
7.4.50.0060.00916.30
7.4.40.0060.01016.29
7.4.10.0070.01016.51
7.4.00.0050.00915.83
7.3.330.0030.00313.07
7.3.320.0030.00313.18
7.3.310.0070.00016.43
7.3.300.0040.00416.36
7.3.290.0000.00716.39
7.3.280.0090.00816.30
7.3.260.0100.00816.53
7.3.240.0130.00916.48
7.3.230.0100.00616.41
7.3.210.0130.01016.27
7.3.200.0130.00316.45
7.3.190.0070.01116.37
7.3.180.0120.00616.39
7.3.170.0040.01816.46
7.3.160.0080.00916.63
7.3.130.0060.01116.38
7.3.120.0090.00916.47
7.3.110.0040.01116.20
7.3.100.0000.01716.38
7.3.90.0090.00916.42
7.3.80.0080.00616.38
7.3.70.0050.00816.49
7.3.60.0080.00916.35
7.3.50.0030.00816.28
7.3.40.0070.01015.73
7.3.30.0070.00715.78
7.3.20.0080.00417.05
7.3.10.0080.00317.08
7.3.00.0070.00917.09
7.2.330.0090.00916.82
7.2.320.0110.00816.50
7.2.310.0070.01016.74
7.2.300.0100.01416.48
7.2.290.0050.01416.74
7.2.260.0050.01416.55
7.2.250.0100.01016.54
7.2.240.0030.01016.65
7.2.230.0050.01116.64
7.2.220.0070.01016.54
7.2.210.0070.00816.47
7.2.200.0110.00516.60
7.2.190.0070.00916.52
7.2.180.0060.00816.63
7.2.170.0060.00915.94
7.2.160.0100.00716.04
7.2.150.0080.00617.32
7.2.140.0050.00917.24
7.2.130.0100.00717.15
7.2.120.0130.00617.17
7.2.110.0070.00617.30
7.2.100.0070.01117.28
7.2.90.0080.01117.22
7.2.80.0120.00717.31
7.2.70.0090.01217.21
7.2.60.0060.00817.31
7.2.50.0040.00917.23
7.2.40.0050.00817.21
7.2.30.0060.00917.42
7.2.20.0070.01017.36
7.2.10.0050.00717.23
7.2.00.0100.00717.21
7.1.330.0060.00817.43
7.1.320.0080.00817.50
7.1.310.0070.00817.40
7.1.300.0090.00517.39
7.1.290.0050.00817.37
7.1.280.0080.00816.35
7.1.270.0360.00516.17
7.1.260.0070.00816.12
7.1.250.0100.01016.21
7.1.240.0060.01017.26
7.1.230.0090.00617.29
7.1.220.0080.00617.33
7.1.210.0070.00717.43
7.1.200.0070.00817.34
7.1.190.0050.01417.29
7.1.180.0080.00317.34
7.1.170.0040.00817.37
7.1.160.0040.00717.30
7.1.150.0050.01017.40
7.1.140.0020.00917.22
7.1.130.0070.00717.23
7.1.120.0090.00517.33
7.1.110.0100.00217.31
7.1.100.0080.00417.35
7.1.90.0040.00917.43
7.1.80.0020.01317.28
7.1.70.0060.00517.36
7.1.60.0050.00717.36
7.1.50.0080.00617.37
7.1.40.0050.00917.42
7.1.30.0080.00517.43
7.1.20.0050.00517.42
7.1.10.0020.01217.32
7.1.00.0080.00517.24

preferences:
56.3 ms | 401 KiB | 5 Q