One-line that reads the file, splits multiple lines into an array:
<?php
$l = explode("\n", file_get_contents("in.txt"));
Want to sort them alphabetically? Add sort($l);
Trim them? $trimmed = array_map(trim, $l);
Remove duplicates? $unique = array_unique($trimmed);