PHP is quite weak in the U.S, I can only assume that's why you got the impression it's dying. In Europe it couldn't be more popular. I'm not here to "defend" PHP, I use Ruby, but living in the Netherlands you'd be amazed how many companies use it. Ruby is a very small niche here in comparison.