Your \SplFileObject will not throw an exception when trying to write to a non-writeable stream!
I forgot to set the second parameter on my \SplFileObject constructor (the mode), costing me minutes to figure out why nothing was writter by the fwrite method...
Just to let you know!