a wrong loop, 1 try, 6.5GB error log under 30sec.

Yes.
title says all: a wrong loop, 1 try, 6.5GB error log under 30sec.
I was trying something and a wrong coded:
do {} while ();
generated 6.5GB error log under 30sec. just with 1 try.
At least it stopped with Fatal error: “Maximum execution time of 30 seconds exceeded”

How can i prevent that insane error log creation when there is a bad coded php?
( I can send that bad coded loop php if anyone interest)