Whenever any officer or employee of the 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 ofservice in the department from which he has been transferred by paying into the pension fund ofthe department to which he is transferred the amount of premiums he would have paid into said fund ifhe had been a member ofsaid 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 the city, namely, the policemen’s[officer’s] pension fund, the firefighter’s pension fund and the general employees’ pension fund.