3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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){ }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Array ( [0] => [1] => a [2] => [3] => b [4] => c( [5] => a [6] => [7] => b [8] => c),d( [9] => a [10] => b( [11] => a [12] => b)),e )
Output for hhvm-3.10.0

Process exited with code 153.