Enhanced php wrapper