I would prefer this to be explode('?', $fileOrUrl, 2), especially for something that gets called frequently.