The PHP function var_dump()
provides debugging output, but has more line-breaks than is needed for readability. This regex strips out the (in my eyes) unnecessary line-breaks. Good in a self written debugging method in combination with ob_start()
and ob_get_contents()
.