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 written by the fwrite method...