3v4l.org

run code in 300+ PHP versions simultaneously
<?php function compose_mail($post) { $ignore_fields = array('G-recaptcha-response'); $content = "Form submission: \n\n"; foreach($post as $name=>$value) { if(!in_array($name,$ignore_fields)) { $content .= ucwords($name).":\n"; $content .= "$value\n\n"; } } return $content; } $array = array( 'lala' => 'tralala', 'waai' => 'woei', 'G-recaptcha-response'=> 'nee' ); echo compose_mail($array);

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.0040.01116.63
8.3.50.0110.00418.22
8.3.40.0070.00720.42
8.3.30.0100.00618.53
8.3.20.0000.00821.85
8.3.10.0030.00622.04
8.3.00.0050.00322.24
8.2.180.0160.00316.50
8.2.170.0120.00922.96
8.2.160.0070.00719.37
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0000.00726.16
8.2.110.0070.00321.02
8.2.100.0080.00417.84
8.2.90.0040.00418.03
8.2.80.0030.00618.04
8.2.70.0040.00718.04
8.2.60.0030.00518.28
8.2.50.0030.00618.10
8.2.40.0030.00619.34
8.2.30.0040.00418.16
8.2.20.0050.00218.12
8.2.10.0040.00419.25
8.2.00.0040.00419.22
8.1.280.0060.00825.92
8.1.270.0050.00523.90
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00324.02
8.1.230.0090.00322.73
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0090.00017.35
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0000.00817.62
8.1.160.0000.00718.80
8.1.150.0030.00418.93
8.1.140.0040.00418.84
8.1.130.0040.00417.45
8.1.120.0030.00617.52
8.1.110.0040.00417.48
8.1.100.0000.00817.46
8.1.90.0000.00817.44
8.1.80.0040.00417.47
8.1.70.0030.00317.33
8.1.60.0040.00417.60
8.1.50.0050.00317.48
8.1.40.0000.00817.53
8.1.30.0030.00517.64
8.1.20.0000.00817.60
8.1.10.0090.00017.50
8.1.00.0030.00617.33
8.0.300.0070.00019.65
8.0.290.0060.00316.75
8.0.280.0000.00818.38
8.0.270.0000.00717.96
8.0.260.0000.00716.81
8.0.250.0060.00016.94
8.0.240.0000.00716.96
8.0.230.0040.00416.87
8.0.220.0040.00416.88
8.0.210.0030.00316.88
8.0.200.0000.00616.88
8.0.190.0070.00016.85
8.0.180.0040.00416.92
8.0.170.0000.00916.91
8.0.160.0070.00016.94
8.0.150.0070.00016.89
8.0.140.0000.00716.84
8.0.130.0030.00313.25
8.0.120.0040.00416.88
8.0.110.0040.00416.78
8.0.100.0000.00716.86
8.0.90.0060.00316.92
8.0.80.0130.00416.86
8.0.70.0070.00016.95
8.0.60.0040.00416.78
8.0.50.0040.00416.87
8.0.30.0060.01317.14
8.0.20.0100.01416.96
8.0.10.0040.00416.97
8.0.00.0070.01016.63
7.4.330.0020.00215.55
7.4.320.0060.00016.52
7.4.300.0060.00016.57
7.4.290.0030.00516.52
7.4.280.0050.00216.38
7.4.270.0030.00316.58
7.4.260.0050.00013.34
7.4.250.0000.00816.42
7.4.240.0030.00316.51
7.4.230.0040.00416.31
7.4.220.0050.00216.54
7.4.210.0050.01116.54
7.4.200.0000.00716.58
7.4.130.0100.00716.48
7.4.120.0110.00816.36
7.4.110.0200.00016.57
7.4.100.0120.00416.50
7.4.90.0090.00916.44
7.4.80.0060.00919.39
7.4.70.0110.00616.58
7.4.60.0120.00416.57
7.4.50.0040.01116.38
7.4.40.0130.00416.39
7.4.30.0130.00316.46
7.4.20.0060.01516.52
7.4.10.0110.00716.40
7.4.00.0160.00016.66
7.3.330.0030.00316.36
7.3.320.0000.00613.28
7.3.310.0060.00016.19
7.3.300.0030.00316.27
7.3.290.0040.00416.38
7.3.280.0030.01316.20
7.3.260.0000.01716.40
7.3.240.0080.00916.42
7.3.230.0060.01016.52
7.3.210.0120.00616.50
7.3.200.0130.00316.64
7.3.190.0080.01116.61
7.3.180.0130.00316.37
7.3.170.0130.00716.56
7.3.160.0110.00516.56
7.3.150.0090.00616.50
7.3.140.0070.01116.51
7.3.130.0060.01016.37
7.3.120.0070.01016.29
7.3.110.0000.01616.52
7.3.100.0080.00816.36
7.3.90.0100.01016.31
7.3.80.0160.00016.16
7.3.70.0030.01416.32
7.3.60.0080.00816.37
7.3.50.0000.01816.30
7.3.40.0130.00316.48
7.3.30.0130.00316.39
7.3.20.0130.00616.47
7.3.10.0090.00916.23
7.3.00.0070.01016.42
7.2.330.0120.00616.50
7.2.320.0140.00316.71
7.2.310.0100.00616.59
7.2.300.0070.01116.65
7.2.290.0160.00016.60
7.2.280.0140.00816.73
7.2.270.0140.00716.32
7.2.260.0070.01016.76
7.2.250.0100.00716.63
7.2.240.0100.00716.35
7.2.230.0040.01116.64
7.2.220.0090.00916.61
7.2.210.0030.01416.51
7.2.200.0060.01116.54
7.2.190.0140.00316.66
7.2.180.0090.00616.53
7.2.170.0040.01216.53
7.2.160.0130.00316.61
7.2.150.0100.00716.75
7.2.140.0080.01216.56
7.2.130.0100.00716.57
7.2.120.0090.00916.60
7.2.110.0060.01116.61
7.2.100.0140.00716.56
7.2.90.0120.00916.49
7.2.80.0000.02116.51
7.2.70.0140.00716.62
7.2.60.0070.01016.59
7.2.50.0100.01016.58
7.2.40.0090.00916.62
7.2.30.0130.00316.70
7.2.20.0060.01016.76
7.2.10.0230.01516.62
7.2.00.0110.00716.66

preferences:
30.19 ms | 401 KiB | 5 Q