Here's the patch against 1.4. I adapted the instructions a little, for example, to refer to php-mode-hook instead of php-mode-user-hook. I also added the "final" keyword to the function regexp. But for the most part, it's the same patch with different context so it applies cleanly.
I only have emacs21 installed, so that's all I tested against. I'd love to hear from someone with emacs22 about whether it works there, too.
I didn't see how to upload an additional patch to #2027841, so I've opened this new one instead.
This patch organizes the imenu by PHP class. Functions appear in the imenu (or speedbar) under the class in which they are defined, not under an unwieldy list of all functions.
With the improved organization, the PHP mode imenu becomes much more useful for conveying a code overview.