https://codelibrary.amlegal.com/codes/philadelphia/latest/philadelphia_pa/0-0-0-185660#JD_A-101
A-102.6 Existing structures. 10 The legal occupancy of any structure existing on the date of adoption of the Building Construction and Occupancy Code, or any subcode thereof, shall be permitted to continue without change, except as is specifically covered in such code, the Philadelphia Property Maintenance Code or Philadelphia Fire Code, or as is deemed necessary by the code official for the general safety and welfare of the occupants and the public. This Section (A-102.6) is subject to the following provisions of the UCC:
1. A building that was built before April 27, 1927 is deemed to be legally occupied until the owner proposes to renovate, add an addition, alter or change the occupancy of the building. The renovation, addition, alteration or change in occupancy must comply with the UCC.
2. For all existing structures built on or after April 27, 1927, the code official is authorized to issue a certificate of occupancy if the building meets the requirements of the latest adopted version of the "International Existing Building Code". The code official may deny the issuance of a certificate of occupancy if the official deems that a building is unsafe because of inadequate means of egress, inadequate lighting and ventilation, fire hazards or other dangers to human life or to public welfare.
A-102.6.1 Existing installations. Except as otherwise specifically provided for in the technical codes, a provision in the technical codes shall not require the removal, alteration or abandonment of, nor prevent the continued utilization and maintenance of the following systems and equipment lawfully in existence at the time of adoption of this code and the technical codes.
1. Building envelope
2. Electrical systems and equipment
3. Fuel gas installations
4. Mechanical systems
5. Plumbing systems
6. Service water-heating systems
A-102.6.2 Buildings not previously occupied. 11 A building or portion of a building that has not been previously occupied or used for its intended purpose in accordance with the laws in existence at the time of its completion shall comply with the Building or Residential Code as applicable for new construction or with any current permit for such occupancy.
https://codelibrary.amlegal.com/codes/philadelphia/latest/philadelphia_pa/0-0-0-185660#JD_A-101