Pregunta

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");
?>
¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top