I'm familiar with both, but it's a little difficult to make a recommendation with so little context. Why do you want to learn one of these languages? Is there a specific reason / project or do you just want to "learn to code"?
PHP is probably more mature than Rails for web apps (please don't hurt me, Rubyists) but strictly for speed of setup of new products Rails is probably faster.
My answer would likely be different if you were looking to learn to program as a professional.