2 ini_set auto_detect_line_endings bool
6 ini_set("auto_detect_line_endings", "on");
7 var_dump(ini_get("auto_detect_line_endings"));
9 $filePath = __DIR__ . DIRECTORY_SEPARATOR . "auto_detect_line_endings_2.txt";
10 file_put_contents($filePath, "fooBar1\rfooBar2\rfooBar3");
12 $stdin = fopen($filePath, "r");
13 var_dump(fgets($stdin));
14 var_dump(fgets($stdin));
15 var_dump(fgets($stdin));
27 unlink(__DIR__ . DIRECTORY_SEPARATOR . "auto_detect_line_endings_2.txt");