I have the following code:
explode(\"delimiter\", $snippet);
But I want that my delimiter is case-insensitive.
You can first replace the delimiter and then use explode as normal. This can be done as a fairly readable one liner like this:
explode($delimiter,str_ireplace($delimiter,$delimiter,$snippet));