<?php $str = "+beta-bar.baz-bz.fd.zz";$a = preg_split('/[+.]/', $str, -1, PREG_SPLIT_NO_EMPTY);print_r($a);
Standard input is empty
Array ( [0] => beta-bar [1] => baz-bz [2] => fd [3] => zz )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!