3v4l.org

run code in 300+ PHP versions simultaneously
<?php # # Note that in this example, you can achieve the same result by imploding the terms # but I left it as is to resemble your code. # function cameramodel($delimiter) { # Example terms... $terms = ["one", "two", "three"]; # Create an array to store the results. $result = []; # Iterate over every term. foreach ($terms as $term) { # Insert the term into the result array. $result[] = $term; } # Return the elements of the array glued together as a string. return implode($delimiter, $result); } # Call the function using a demiliter of your choice. $cameramodel = cameramodel(" and\n"); ?> <?php echo $cameramodel; ?>
Output for git.master_jit, git.master, rfc.property-hooks
one and two and three

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:
26.41 ms | 405 KiB | 5 Q