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']);
Output for git.master_jit, git.master, rfc.property-hooks
You can download the selected records in Word. You can download the selected records in Word, or Excel. You can download the selected records in Word, or PDF. You can download the selected records in Word, Excel, or PDF. You can send the selected records to your email. You can download the selected records in Word, or send them to your email. You can download the selected records in Word, Excel, or send them to your email. You can download the selected records in Word, PDF, or send them to your email. You can download the selected records in Word, Excel, PDF, or send them to your email.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.88 ms | 407 KiB | 5 Q