Drivers may open car doors on the side on which traffic is moving only when it can be done safely and without interfering with traffic.

A driver or passenger may not open doors on the side of a vehicle on which traffic is moving unless it can be done safely and without interfering with traffic. The door may remain open only long enough to load or unload passengers.
DMV Writen Test