My second question, I know file_get_contents is faster than fopen, reason why I'm using it. But is it more efficient for what I'm using fopen to do? I'm wanting to use this to convert a CSV into an array.
It worked a charm! How fast is it compared to going down the file_get_contents & explode method?
I don't know definitively but I'd guess slower since SplFileObject does a lot more than a quick file_get_contents/explode will. But I can't see it being a bottleneck and not something to worry about. The ability to foreach over the data and cater for field delimiters, escape characters, etc. simply wins it for me.