Fix hideous bug in php for calculation of member comparisons