3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'a,b,c(a,b,c),d(a,b(a,b)),e'; $temp = preg_split('/(\w),/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); print_r($temp); foreach($temp as $tok){ }

preferences:
40.75 ms | 402 KiB | 5 Q