More accurately retrieve the class contents

Patch shamelessly stolen from  EvanDotPro/phpcomplete.vim #49507d1
Kudos for the patch.