Added legacy php code.