3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 'color=blue,red,weight=100kg,another=one,two,three,four,okay=enough,'; var_export(preg_split('~,(?=[^,]+=)~', rtrim($input, ','), 0, PREG_SPLIT_NO_EMPTY));

preferences:
25.91 ms | 406 KiB | 5 Q