php compatibility fix