3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function utils_removeDuplicates($str, $delimiter = ',') { if($str != '') { $str = implode($delimiter,array_unique(explode($delimiter, $str))); } return $str; } $data = "88, 99, 99,99, 100"; //echo utils_removeDuplicates($data); echo preg_split( '/[, ]+/', $data, -1, PREG_SPLIT_NO_EMPTY );
based on 5N81m
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/jHcVT on line 12 Array
Output for 4.3.0 - 5.3.29
Array