3v4l.org

run code in 300+ PHP versions simultaneously
<?php function outputOptions(array $options){ if ($options[0] == 'email') { echo "You can send the selected records to your email."; } else { echo "You can download the selected records in $options[0]"; $last = count($options) - 1; if($last == 0) echo '.'; else { for($i = 1; $i < $last; $i++) echo ", $options[$i]"; echo $options[$last] == 'email' ? ', or send them to your email.' : ", or $options[$last]."; } } echo "\n"; } outputOptions(['Word']); outputOptions(['Word', 'Excel']); outputOptions(['Word', 'PDF']); outputOptions(['Word', 'Excel', 'PDF']); outputOptions(['email']); outputOptions(['Word', 'email']); outputOptions(['Word', 'Excel', 'email']); outputOptions(['Word', 'PDF', 'email']); outputOptions(['Word', 'Excel', 'PDF', 'email']);

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.5.20.0100.00817.76
8.5.10.0050.00616.73
8.5.00.0080.01220.02
8.4.170.0130.01023.88
8.4.160.0150.00823.64
8.4.150.0020.00014.05
8.4.140.0140.00717.70
8.4.130.0090.01217.57
8.4.120.0100.00822.00
8.4.110.0100.00922.60
8.4.100.0130.00917.57
8.4.90.0120.00818.50
8.4.80.0100.01017.70
8.4.70.0090.01218.11
8.4.60.0120.00719.03
8.4.50.0040.00420.35
8.4.40.0000.01918.61
8.4.30.0120.00322.11
8.4.20.0100.01022.29
8.4.10.0030.00623.80
8.3.290.0120.00920.88
8.3.280.0110.01118.54
8.3.270.0140.00616.70
8.3.260.0100.00916.48
8.3.250.0080.00718.95
8.3.240.0160.00416.48
8.3.230.0130.00716.55
8.3.220.0130.00617.36
8.3.210.0050.00416.73
8.3.200.0050.00316.57
8.3.190.0090.01117.13
8.3.180.0110.01016.66
8.3.170.0060.01217.14
8.3.160.0090.01018.52
8.3.150.0110.01120.89
8.3.140.0110.00417.41
8.3.130.0100.00618.43
8.3.120.0060.00320.48
8.3.110.0050.00518.26
8.3.100.0060.00316.60
8.3.90.0110.00026.77
8.3.80.0060.00318.55
8.3.70.0080.00816.58
8.3.60.0100.00718.31
8.3.50.0120.00616.60
8.3.40.0070.00721.93
8.3.30.0070.00720.33
8.3.20.0050.00324.18
8.3.10.0050.00224.66
8.3.00.0040.00426.16
8.2.300.0110.01017.99
8.2.290.0130.00720.66
8.2.280.0060.00518.66
8.2.270.0120.00617.25
8.2.260.0080.00817.26
8.2.250.0120.00918.36
8.2.240.0080.00017.18
8.2.230.0110.00820.94
8.2.220.0080.00424.06
8.2.210.0120.00326.77
8.2.200.0090.00016.63
8.2.190.0130.00318.41
8.2.180.0130.00325.92
8.2.170.0090.01219.08
8.2.160.0170.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00720.93
8.2.110.0070.00419.39
8.2.100.0110.00017.84
8.2.90.0000.00918.77
8.2.80.0130.00518.77
8.2.70.0140.00318.77
8.2.60.0100.00718.77
8.2.50.0130.00418.77
8.2.40.0110.00418.77
8.2.30.0130.00318.77
8.2.20.0060.00318.77
8.2.10.0130.00518.77
8.2.00.0160.00018.77
8.1.340.0130.00819.55
8.1.330.0110.00821.71
8.1.320.0080.01116.09
8.1.310.0150.00316.83
8.1.300.0090.00017.77
8.1.290.0090.00030.84
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00921.02
8.1.230.0000.01120.30
8.1.220.0130.00318.77
8.1.210.0160.00418.77
8.1.200.0090.00918.77
8.1.190.0090.00918.77
8.1.180.0090.00618.77
8.1.170.0090.00718.77
8.1.160.0130.00418.77
8.1.150.0070.01018.77
8.1.140.0110.00618.77
8.1.130.0180.00018.77
8.1.120.0080.01018.77
8.1.110.0090.01018.77
8.1.100.0140.00318.77
8.1.90.0170.00018.77
8.1.80.0120.00818.77
8.1.70.0100.00818.77
8.1.60.0110.00818.77
8.1.50.0140.00418.77
8.1.40.0160.00318.77
8.1.30.0130.00518.77
8.1.20.0150.00418.77
8.1.10.0150.00418.77
8.1.00.0140.00418.77
8.0.300.0080.00018.77
8.0.290.0170.00018.77
8.0.280.0130.00418.77
8.0.270.0120.00618.77
8.0.260.0130.00418.77
8.0.250.0100.00718.77
8.0.240.0100.00718.77
8.0.230.0130.00418.77
8.0.220.0080.00818.77
8.0.210.0120.00618.77
8.0.200.0060.01218.77
8.0.190.0130.00418.77
8.0.180.0170.00018.77
8.0.170.0180.00018.77
8.0.160.0150.00218.77
8.0.150.0080.00818.77
8.0.140.0130.00318.77
8.0.130.0080.00818.77
8.0.120.0120.00618.77
8.0.110.0160.00018.77
8.0.100.0120.00818.77
8.0.90.0140.00418.77
8.0.80.0130.00418.77
8.0.70.0140.00318.77
8.0.60.0110.00518.77
8.0.50.0120.00418.77
8.0.30.0140.00418.77
8.0.20.0110.00618.77
8.0.10.0180.00018.77

preferences:
53.52 ms | 403 KiB | 5 Q