Whenever any officer or employee of such city is transferred from one department to another, he shall be entitled to become a member of the pension fund of the department to which he has been transferred and to receive credit for the years of service in the department from which he has been transferred by paying into the pension fund of the department to which he is transferred the amount of premiums he would have paid into said fund if he had been a member of said department for the number of years he claims credit for service in the other department. Such transferred employee shall have the right to have transferred from the pension fund the amount he had paid into such fund. The rights given in this act shall be effective as to the officers and employees who have transferred prior to this act, as well as future transferees. This act shall apply to all the pension funds of such city, namely, the policemen's pension fund, the firemen's pension fund and the general employees' pension fund.