3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeIdFromString(string $str, string$id):string { return str_replace([$id, ',,'], ['',','], $str); } $str = "3,5,7,9"; echo removeIdFromString($str,7);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
160.99 ms | 3322 KiB | 12 Q