refactored parser accroding to #992
added method #2 to php55test to reproduce issue