How to access standard error stream in PHP?

by garnet.barrows , in category: Technology , 3 years ago

How to access standard error stream in PHP?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by bria_metz , 3 years ago

You can access standard error stream in PHP by using following code snippet:

1
2
3
4
5
$stderr = fwrite("php://stderr");

$stderr = fopen("php://stderr", "w");

$stderr = STDERR;