3v4l.org

run code in 300+ PHP versions simultaneously
<?php function heaven_knows_why($text, $start, $elements, $step = 1) { $arr = []; for( $i = $start, $j=1, $s=$start; $j <= $elements; $j++, $i++, $s += $step ){ $arr[] = $text . $s; } return $arr; } var_export(heaven_knows_why('file', 2, 5, 3)); echo "\n---\n"; var_export(heaven_knows_why('file', 5, 4, 20)); echo "\n---\n"; var_export(heaven_knows_why('file', 8, 3, 4)); echo "\n---\n"; var_export(heaven_knows_why('file', 3, 3, 7)); echo "\n---\n";
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'file2', 1 => 'file5', 2 => 'file8', 3 => 'file11', 4 => 'file14', ) --- array ( 0 => 'file5', 1 => 'file25', 2 => 'file45', 3 => 'file65', ) --- array ( 0 => 'file8', 1 => 'file12', 2 => 'file16', ) --- array ( 0 => 'file3', 1 => 'file10', 2 => 'file17', ) ---

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:
142.48 ms | 406 KiB | 5 Q