die(time()*1000); 会输出什么? 嗯也许你会说它输出当前时间戳的1000倍。 但是你错了!它并不一定按照你的预期输出正确的。 在32位的操作系统中,它会输出时间戳的1000倍,但在64操作系统中它什么也不会输出。 why?看看手册吧: 如果 PHP 的版本号大于等于
die(time()*1000);
会输出什么?
嗯也许你会说它输出当前时间戳的1000倍。
但是你错了!它并不一定按照你的预期输出正确的值。
在32位的操作系统中,它会输出时间戳的1000倍,但在64操作系统中它什么也不会输出。
why?看看手册吧:
如果 PHP 的版本号大于等于 4.2.0,那么在 die参数是整数的情况下,不会输出该参数。
好吧,在32位操作系统中,time()*1000已经超出了整形的长度,php会将它转化为浮点型输出。
以下是扩展信息:
die是exit的一个别名,而exit并非真正的函数,而是像echo一样是一条语句(a language construct)。前面说到如果函数的参数是整形,它书不会输出的,这是为什么呢?exit表示脚本退出,儿这个整形的参数标识退出的状态,取值从0到255。0表示正常退出,非零标识为错误码。
[php]<br>//exit program normally<br>exit;<br>exit();<br>exit(0);<br><br>//exit with an error code<br>exit(1);<br>exit(0376); //octal<br>[/php]
http://hipop.co.cc/archives/105

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version
SublimeText3 Linux latest version

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor