3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str2Arr( $s, $r, $str) { $str = trim( str_replace( $s, $r, $str )); return explode(" ", $str); } $it = "(a(am,bam),b(dam,cam))"; //$to = "a.am, a.bam, b.dam, b.cam"; $search = ['),', '(', ')', ',', 'a a', 'b d', 'ba', 'c']; $replace =[' ', ' ', ' ', ' ', 'a.a','b.d', 'a.ba', 'b.c']; var_dump( implode(", ",( str2Arr( $search, $replace, $it) ) ) );
Output for git.master, git.master_jit, rfc.property-hooks
string(25) "a.am, a.bam, b.dam, b.cam"

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.84 ms | 405 KiB | 5 Q