<?php
setcookie('test', "test\r\n<script>alert(1)</script>");
echo 1;
But it turns out PHP automatically does the encoding:
Set-Cookie: test=test%0D%0A%3Cscript%3Ealert%281%29%3C%2Fscript%3E
Does that mean it's impossible to reproduce HTTP response splitting in PHP?