3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contact_rec = array( "bob" => array("email" => "bob@example.com"), "sara" => array("email" => "sara@example.com") ); $contact_rec[0]=""; //The emails of the client foreach($contact as $key => $value) { if($value['email'] != null) $contact_rec[] = $value['email']; } foreach($contact_rec as $key => $value) { $contact_rec[$value] = $value; unset($contact_rec[$key]); }

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.0140.00716.73
8.3.50.0140.00417.41
8.3.40.0060.00918.90
8.3.30.0140.00018.79
8.3.20.0040.00418.95
8.3.10.0030.00620.65
8.3.00.0100.01019.38
8.2.180.0040.01416.75
8.2.170.0070.00722.96
8.2.160.0110.00319.07
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00017.88
8.2.110.0040.00420.20
8.2.100.0080.00417.91
8.2.90.0110.00017.73
8.2.80.0000.00917.97
8.2.70.0030.00618.03
8.2.60.0000.00818.04
8.2.50.0040.00418.16
8.2.40.0000.01020.42
8.2.30.0050.00318.07
8.2.20.0000.01017.67
8.2.10.0070.00017.80
8.2.00.0030.00717.76
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0040.01126.35
8.1.250.0070.00028.09
8.1.240.0090.00022.05
8.1.230.0080.00319.09
8.1.220.0050.00317.79
8.1.210.0080.00018.77
8.1.200.0030.00617.25
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0060.00318.64
8.1.160.0070.00018.88
8.1.150.0000.00718.57
8.1.140.0050.00217.51
8.1.130.0040.00417.75
8.1.120.0060.00317.48
8.1.110.0040.00417.38
8.1.100.0040.00417.44
8.1.90.0030.00617.50
8.1.80.0030.00617.48
8.1.70.0000.00717.42
8.1.60.0110.00017.57
8.1.50.0000.00717.45
8.1.40.0000.00817.52
8.1.30.0000.00817.52
8.1.20.0030.00617.64
8.1.10.0000.00917.55
8.1.00.0070.00017.37
8.0.300.0020.00519.56
8.0.290.0040.00416.63
8.0.280.0070.00018.45
8.0.270.0000.00717.26
8.0.260.0030.00316.87
8.0.250.0000.00717.03
8.0.240.0040.00417.01
8.0.230.0050.00217.02
8.0.220.0030.00316.85
8.0.210.0030.00316.93
8.0.200.0030.00317.04
8.0.190.0070.00016.91
8.0.180.0080.00016.98
8.0.170.0000.00916.94
8.0.160.0040.00417.04
8.0.150.0030.00616.80
8.0.140.0000.00816.95
8.0.130.0030.00313.39
8.0.120.0000.00716.95
8.0.110.0040.00416.84
8.0.100.0000.00816.94
8.0.90.0000.00716.86
8.0.80.0120.00316.91
8.0.70.0000.00717.07
8.0.60.0000.00816.82
8.0.50.0080.00016.75
8.0.30.0070.01317.21
8.0.20.0150.00417.05
8.0.10.0030.00717.14
8.0.00.0080.01216.89
7.4.330.0000.00513.00
7.4.320.0070.00016.58
7.4.300.0030.00316.62
7.4.290.0000.00716.44
7.4.280.0070.00316.57
7.4.270.0000.00716.50
7.4.260.0050.00013.25
7.4.250.0090.00016.66
7.4.240.0000.00716.56
7.4.230.0000.00716.64
7.4.220.0060.00916.60
7.4.210.0120.00316.45
7.4.200.0020.00516.66
7.4.190.0030.00316.55
7.4.160.0030.01216.54
7.4.150.0120.00716.42
7.4.140.0100.01416.66
7.4.130.0150.00616.86
7.4.120.0160.00016.43
7.4.110.0070.01716.28
7.4.100.0100.01016.54
7.4.90.0100.00716.65
7.4.80.0090.00919.39
7.4.70.0090.00616.53
7.4.60.0120.00816.55
7.4.50.0030.00616.30
7.4.40.0100.00316.18
7.4.30.0130.00316.54
7.4.00.0060.00814.86
7.3.330.0060.00013.27
7.3.320.0060.00013.13
7.3.310.0000.00716.39
7.3.300.0030.00316.25
7.3.290.0090.00616.41
7.3.280.0050.01316.43
7.3.270.0060.01316.34
7.3.260.0030.01716.61
7.3.250.0120.00616.45
7.3.240.0100.01016.38
7.3.230.0050.01316.41
7.3.210.0070.01116.39
7.3.200.0060.01016.47
7.3.190.0100.00716.29
7.3.180.0130.00316.38
7.3.170.0090.00616.57
7.3.160.0170.00416.38
7.3.120.0080.01014.75
7.3.110.0090.00814.99
7.3.100.0030.01114.94
7.3.90.0050.00815.03
7.3.80.0030.01114.96
7.3.70.0070.00514.82
7.3.60.0070.00814.84
7.3.50.0060.00814.72
7.3.40.0080.00514.74
7.3.30.0100.00514.73
7.3.20.0070.00616.69
7.3.10.0050.01116.64
7.3.00.0050.00916.72
7.2.330.0060.01216.63
7.2.320.0120.00916.64
7.2.310.0090.01216.45
7.2.300.0130.00916.63
7.2.290.0140.00416.76
7.2.250.0100.00814.93
7.2.240.0070.01215.08
7.2.230.0080.00814.65
7.2.220.0020.01115.10
7.2.210.0090.00314.99
7.2.200.0070.00615.07
7.2.190.0080.00815.07
7.2.180.0070.00614.87
7.2.170.0040.01014.91
7.2.130.0100.00417.00
7.2.120.0090.00916.93
7.2.110.0070.00716.96
7.2.100.0060.01016.67
7.2.90.0110.00716.58
7.2.80.0030.01417.02
7.2.70.0070.01016.55
7.2.60.0060.00916.64
7.2.50.0100.00417.00
7.2.40.0080.00616.91
7.2.30.0000.01216.95
7.2.20.0000.01816.86
7.2.10.0070.01016.93
7.2.00.0080.00818.09
7.1.330.0050.01015.54
7.1.320.0050.00515.97
7.1.310.0030.01215.71
7.1.300.0080.00615.60
7.1.290.0020.00915.85
7.1.280.0100.00615.88
7.1.270.0060.00615.77
7.1.260.0050.00515.66
7.1.250.0130.00315.76
7.1.100.0060.01217.93
7.1.70.0000.00817.31
7.1.60.0000.01116.96
7.1.50.0040.01816.99
7.1.00.0000.07722.47
7.0.200.0060.00916.46
7.0.140.0070.06722.10
7.0.120.0030.07022.08
7.0.60.0070.07019.87
7.0.50.0030.08017.82
7.0.40.0000.08019.90
7.0.30.0130.04720.18
7.0.20.0170.04320.18
7.0.10.0300.04020.12
7.0.00.0030.06320.00
5.6.280.0030.07021.07
5.6.210.0100.08020.71
5.6.200.0030.08718.08
5.6.190.0100.08720.44
5.6.180.0300.05720.37
5.6.170.0370.07320.42
5.6.160.0000.08720.50
5.6.150.0130.08018.15
5.6.140.0100.07018.11
5.6.130.0170.03318.22
5.6.120.0030.04321.04
5.6.110.0270.07321.08
5.6.100.0070.05320.98
5.6.90.0070.04720.99
5.6.80.0070.04320.50
5.6.70.0200.03320.37
5.5.350.0370.07320.39
5.5.340.0100.03317.99
5.5.330.0070.09720.13
5.5.320.0270.07320.41
5.5.310.0270.08020.24
5.5.300.0070.06717.93
5.5.290.0070.06017.88
5.5.280.0100.06020.86
5.5.270.0070.04020.79
5.5.260.0070.04720.83
5.5.250.0070.08320.61
5.5.240.0130.06720.25
5.4.450.0100.07719.29
5.4.440.0030.07319.50
5.4.430.0030.07719.23
5.4.420.0030.07719.44
5.4.410.0130.07019.20
5.4.400.0100.07318.81
5.4.390.0200.06319.08
5.4.380.0130.03319.18
5.4.370.0030.05019.14
5.4.360.0030.06719.09
5.4.350.0000.09018.91
5.4.340.0200.06019.18
5.4.320.0170.05319.16
5.4.310.0070.03718.81
5.4.300.0000.05718.80
5.4.290.0100.04318.91
5.4.280.0070.04018.96
5.4.270.0130.06719.08
5.4.260.0100.07319.18
5.4.250.0100.06719.16
5.4.240.0030.04319.17
5.4.230.0030.05018.78
5.4.220.0130.06318.79
5.4.210.0100.07019.17
5.4.200.0030.04319.17
5.4.190.0070.07318.91
5.4.180.0030.04319.11
5.4.170.0130.07019.17
5.4.160.0200.05019.06
5.4.150.0070.07318.78
5.4.140.0100.07016.25
5.4.130.0070.07316.29
5.4.120.0100.06016.43
5.4.110.0030.06016.41
5.4.100.0070.03716.31
5.4.90.0070.04016.32
5.4.80.0030.06716.29
5.4.70.0130.06316.25
5.4.60.0170.06716.38
5.4.50.0200.05016.24
5.4.40.0070.07716.39
5.4.30.0030.07316.38
5.4.20.0130.06716.23
5.4.10.0130.03716.25
5.4.00.0000.05315.78
5.3.290.0100.04714.56
5.3.280.0030.08314.47
5.3.270.0070.04714.62
5.3.260.0070.07014.62
5.3.250.0070.07314.62
5.3.240.0100.07314.53
5.3.230.0070.08014.54
5.3.220.0070.07714.59
5.3.210.0070.04714.49
5.3.200.0100.04714.44
5.3.190.0170.04314.49
5.3.180.0000.04014.49
5.3.170.0030.04314.53
5.3.160.0030.06014.35
5.3.150.0070.05014.65
5.3.140.0100.05714.38
5.3.130.0130.07014.34
5.3.120.0000.05014.45
5.3.110.0130.05714.37
5.3.100.0070.05013.82
5.3.90.0100.05313.94
5.3.80.0070.05313.84
5.3.70.0070.07713.95
5.3.60.0030.08013.93
5.3.50.0030.07313.86
5.3.40.0100.04713.92
5.3.30.0000.04713.85
5.3.20.0030.07313.48
5.3.10.0030.07713.58
5.3.00.0000.06713.57
5.2.170.0070.05711.10
5.2.160.0030.04310.97
5.2.150.0030.05311.14
5.2.140.0100.05711.04
5.2.130.0100.05311.07
5.2.120.0030.04011.09
5.2.110.0030.05311.09
5.2.100.0170.02711.05
5.2.90.0030.06310.96
5.2.80.0070.05311.07
5.2.70.0000.06711.02
5.2.60.0130.05010.97
5.2.50.0030.03010.84
5.2.40.0000.03310.96
5.2.30.0070.06010.82
5.2.20.0130.04310.93
5.2.10.0070.06011.01
5.2.00.0070.05310.86
5.1.60.0100.05010.14
5.1.50.0030.0509.98
5.1.40.0070.0409.88
5.1.30.0000.06310.22
5.1.20.0070.04310.52
5.1.10.0030.06010.04
5.1.00.0030.05710.06
5.0.50.0070.0338.52
5.0.40.0000.0478.41
5.0.30.0000.0708.21
5.0.20.0070.0178.19
5.0.10.0030.0208.17
5.0.00.0070.0538.16
4.4.90.0030.0377.90
4.4.80.0000.0207.90
4.4.70.0030.0237.90
4.4.60.0000.0407.90
4.4.50.0000.0237.90
4.4.40.0030.0577.90
4.4.30.0030.0237.90
4.4.20.0070.0337.90
4.4.10.0000.0337.90
4.4.00.0070.0277.90
4.3.110.0000.0307.90
4.3.100.0030.0207.90
4.3.90.0030.0337.90
4.3.80.0000.0577.90
4.3.70.0000.0277.90
4.3.60.0000.0207.90
4.3.50.0000.0177.90
4.3.40.0030.0507.90
4.3.30.0000.0177.90
4.3.20.0000.0237.90
4.3.10.0000.0237.90
4.3.00.0000.0177.90

preferences:
43.24 ms | 401 KiB | 5 Q