0 shabi answered Jul 19 '21 00:00 fopen() function is useful to write at stderr $filepointer=fopen('php://stderr','w'); fwrite($filepointer,'error in php '); fclose($filepointer); Edit Answer