Why does this code run differently in CakePHP vs. a normal PHP file?
<?php
$data = "   One
Two
Three
Four";
$data = trim($data);
$data = preg_replace("/\n{2,}/", "\n", $data);
$data = explode("\n",$data);
var_dump($data);
?>
When I run this code in a normal PHP file, I get
array
  0 => string 'One' (length=3)
  1 => string 'Two' (length=3)
  2 => string 'Three' (length=5)
  3 => string 'Four' (length=4)
but if I run it from a Cake controller I get
Array
(
    [0] => one
    [1] => 
    [2] => 
    [3] => two
    [4] => 
    [5] => three
    [6] => 
    [7] => 
    [8] => 
    [9] => four
)