Anyone who hangs around the #phpc room on freenode, know how much I enjoy complaining about PHP annoyances. The fact of the matter is that because of PHP's irregularities unless you have intimate knowledge of how a function works, it's VERY difficult to predict its behavior.
explode('\n', $string);
strtok($string, '\n');
Explode ...