Somehow when i read the content of some files with file_get_contents, i see NUL value, the text file seems OK when i open with notepad or other text utility. I finally fixed it with this solution.
$process_list=file_get_contents($wmic_output_file);
$process_list=str_replace(chr(0), '', $process_list);