How to access standard error stream in PHP?

Member

garnet.barrows

by garnet.barrows , in category: Technology , a month ago

How to access standard error stream in PHP?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by bria_metz , a month 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;