Question

The problem is pretty simple and annoying. I want to print as response just a '0' string, a zero value, nothing else.

I tried with:

exit(0);
exit('0');
exit("0");
echo "0";

$foo = '0';
exit($foo);

exit(intval('0'));

It always comes out with a null response. The same on PHP 4, 5.2 & 5.3. It's driving me crazy.

UPDATE:

<?php
die("0");
?>
Was it helpful?

Solution

Well, the problem was not in my pecies of code. I emailed my hosting support which could reproduce it successfully. The only way was to move to a different kind of output in order to get it diaplyed correctly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top