I have this strange problem. When debugging, I have sometimetimes code looking like this
<?php
$var = 15;
die($var);
die()
function works, but outputs nothing
However, this one works
<?php
$var = 15;
die($var."<-");
http://sandbox.phpcode.eu/g/81462.php
How is it possible? Did I miss something? or is it bug?
See http://www.php.net/manual/en/function.exit.php (die() is equivalent to exit())
If status is a string, this function prints the status just before exiting.
If status is an integer, that value will be used as the exit status and not printed. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With