Depending on the flight/airline you choose, base on your travel preference dates, stops and layovers will vary. For example, Air Canada have a 12 hr layover in Toronto while United Airlines (on a diff date/time for a couple of dollars higher will have a connection at EWR for less than an hour).
Travel Availability: January-March 2017
Search on google for PHX-BCN [google.com] or PHX-MAD [google.com] for availability