标签: php io protocols wrapper
PHP中 STDOUT 和 php:// STDOUT 有什么区别?
fwrite(STDOUT, ...);
VS
$StdOut = fopen('php://stdout', 'w'); fwrite($StdOut, ...);
答案 0 :(得分:4)
前者是文件描述符1,第二个是新FD中FD1的副本(例如3)。
答案 1 :(得分:2)
STDOUT仅适用于CLI sapi
STDOUT