More compatible with older php versions.