A320
Flight Crew Instrument; Flight Crew Multiengine; Flight Crew Air Transport Pilot (ATP)
Communication Breakdown
Deviation / Discrepancy - Procedural FAR; Deviation / Discrepancy - Procedural Published Material / Policy
Air Traffic Control Issued Advisory / Alert; Flight Crew Requested ATC Assistance / Clarification
Human Factors
We departed VFR from Runway 6 at ZZZ 20 minutes after the Tower had closed. Prior to the Tower closing we had obtained our IFR clearance and squawk code from the Local Controller which we entered into the transponder. We also queried him about the preferred departure procedures to use when the Tower was closed. He was not aware of any preferred procedure. Do to the late hour; clear weather; and lack of local traffic my First Officer and I discussed and agreed that a VFR departure would be appropriate and we would pick up our clearance airborne with PHL Approach Control. We subsequently departed without incident and contacted PHL Approach a few miles off the departure end of the runway while leveling at 2000 ft. The Controller radar identified us and asked if we had been released. We responded that we had departed VFR and (as such) did not have (or need) an IFR release. She then proceeded to inform us that if we were departing VFR we should have been squawking 1200 instead of the discrete code we had been given earlier further emphasizing that if we were going to use that discrete code then we should have obtained an IFR release. We apologized for the confusion and the rest of the flight proceeded without incident.In our case; squawking 1200 instead of the assigned discrete code would have eliminated the confusion with PHL Approach as to our VFR/IFR status. This was a little incipient in that we had obtained the discrete code from the tower before they closed and as a course of habit entered it into the transponder then subsequently didn't think to change it back to 1200 before departing.  As an overall safety recommendation; the installation of an RCO (Remote Communication Outlet) to PHL Approach would allow direct access via VHF radio to obtain IFR clearances and/or releases. This would reduce the need to depart VFR and obtain clearances airborne. In my opinion; reliance on personal cell phones to accomplish this task is a marginal solution at best.
A320 Captain reported the flight crew failed to squawk 1200 after taking off VFR.