properly making php library backwards compliant