Added some exceptions to the PHP renderer's serializer
Minor change. No functional change intended