3v4l.org

run code in 300+ PHP versions simultaneously
<?php $default = array( 'Year', 'Mining-1969-70=100', 'Mining-1975-76=100', 'Man-1980-81=100', 'Man-198081=100', ); $default2 = array( 'Year', 'Mining-1969-70=100', 'Mining-1975-76=100', 'Mining-1980-81=100', 'Man-198081=100', ); function getFollowingSimilarValues($arr, $start) { $count = count($arr); if ($start >= $count) return array(); $result = array($arr[$start]); $strpos = strpos($arr[$start],'-'); for ($i=($start+1); $i<$count; $i++) { if (strncasecmp($arr[$start], $arr[$i], $strpos) == 0) $result[] = $arr[$i]; } return $result; } print implode(", ", getFollowingSimilarValues($default, 1))."<br>"; print implode(", ", getFollowingSimilarValues($default2, 1));
Output for git.master, git.master_jit, rfc.property-hooks
Mining-1969-70=100, Mining-1975-76=100<br>Mining-1969-70=100, Mining-1975-76=100, Mining-1980-81=100

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:
40.6 ms | 401 KiB | 8 Q