整数没有被显示为die()参数? [英] Integer is not being shown as die() argument?
问题描述
<?php
$ var = 15;
die($ var);
die()
功能有效,但输出没有什么
但是,这个工作
<?php
$ var = 15;
die($ var。< - );
http://sandbox.phpcode.eu/g/81462.php
怎么可能?我错过了什么?或者是错误?
请参阅 http://www.php.net/manual/en/function.exit.php (die()等效于exit())
如果状态是字符串,则此功能会在退出之前打印状态。
如果状态是一个整数,该值将被用作退出状态,而不是打印。退出状态应在0到254之间,退出状态255由PHP保留,不得使用。状态0用于成功终止程序。
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.
这篇关于整数没有被显示为die()参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!