1--TEST-- 2ini_set auto_detect_line_endings bool 3--FILE-- 4<?php 5 6ini_set("auto_detect_line_endings", "on"); 7var_dump(ini_get("auto_detect_line_endings")); 8 9$filePath = __DIR__ . DIRECTORY_SEPARATOR . "auto_detect_line_endings_2.txt"; 10file_put_contents($filePath, "fooBar1\rfooBar2\rfooBar3"); 11 12$stdin = fopen($filePath, "r"); 13var_dump(fgets($stdin)); 14var_dump(fgets($stdin)); 15var_dump(fgets($stdin)); 16 17echo "Done\n"; 18?> 19--EXPECTF-- 20Deprecated: auto_detect_line_endings is deprecated in %s on line %d 21string(2) "on" 22string(8) "fooBar1 22" 23string(8) "fooBar2 23" 24string(7) "fooBar3" 25Done 26--CLEAN-- 27<?php 28unlink(__DIR__ . DIRECTORY_SEPARATOR . "auto_detect_line_endings_2.txt"); 29?> 30