3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'BCFSW|'; $arr = array('BF','BCF','BFS','BFW'); $str = str_split($str); Foreach($arr as $item){ $temp = str_split($item); $new[] = implode("",array_diff($str, $temp)) . implode("",array_intersect($temp, $str)); } var_dump($new);
Output for git.master_jit, git.master, rfc.property-hooks
array(4) { [0]=> string(6) "CSW|BF" [1]=> string(6) "SW|BCF" [2]=> string(6) "CW|BFS" [3]=> string(6) "CS|BFW" }

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:
44.91 ms | 1961 KiB | 4 Q