1 EXHIBIT 5 OPINION OF KING & SPALDING REGARDING LEGALITY OF SHARES BEING REGISTERED 2 [LETTERHEAD OF KING & SPALDING] June 28, 1996 Medaphis Corporation 2700 Cumberland Parkway Suite 300 Atlanta, Georgia 30339 Re: Medaphis Corporation -- Form S-8 Registration Statement ------------------------------------------------------- Gentlemen: We have acted as counsel to Medaphis Corporation, a Delaware corporation (the "Company"), in connection with the preparation of a Registration Statement on Form S-8 (the "Registration Statement") to be filed with the Securities and Exchange Commission relating to 1,500,000 shares of the Company's voting common stock, par value $.01 per share ("Common Stock"), to be offered pursuant to the Amended and Restated Medaphis Corporation Non-Qualified Stock Option Plan (the "Plan"). In so acting, we have examined and relied upon such records, documents, certificates and other instruments as in our judgment are necessary or appropriate to form the basis for the opinion set forth below. In all such examinations, we have assumed the genuineness of signatures on original documents and the conformity to such original documents of all copies submitted to us as certified, conformed or photographic copies, and as to certificates of public officials, we have assumed the same to have been properly given and to be accurate. This opinion is limited in all respects to the federal laws of the United States of America and the laws of the State of Delaware, and no opinion is expressed with respect to the laws of any other jurisdiction or any effect which such laws may have on the opinion expressed below. Based upon the foregoing and subject to the limitations, qualifications and assumptions set forth in this letter, we are of the opinion that the shares of Common Stock to be issued upon the exercise of stock options ("Options") granted under the Plan are duly authorized and assuming (i) the shares of Common Stock so issuable continue to be duly authorized on the dates of exercise, (ii) on the dates of exercise, the Options will have been duly executed, issued, and delivered, will constitute the legal, valid, and binding obligations of the Company, and will (subject to applicable bankruptcy, insolvency, and other laws affecting the enforceability of creditors' rights generally) be enforceable as to the Company in accordance with their terms, and (iii) no change occurs in the applicable law or the pertinent facts, then, when the Options are exercised in accordance with their terms and the terms of the Plan (including the payment of any consideration therefor), the shares of Common Stock so issuable will be validly issued, fully paid and nonassessable. 3 Medaphis Corporation June 28, 1996 Page 2 - -------------------- We consent to the filing of this opinion as an Exhibit to the Registration Statement. Very truly yours, /s/ King & Spalding ------------------- KING & SPALDING