I know people say in Europe (say in Computer Science) a PhD normally takes three to four years. My concern is: is there no way to know the number of years in advance? Is it not something I can "agree" with the supervisors before hand how long it will take? Exactly? Not approximately, rather exactly. In other words are three year long phd programs common?
Almost certainly not.
Even in programs where the PhD research phase is supposed to have a defined length (for instance, when students receive a fellowship to cover their work for a certain period of time), it is not possible to guarantee that the PhD program will actually be completed in a certain period of time.
It can be possible to finish; however, without knowing how well a student will perform in advance, advisors can only estimate how long a PhD program will take. There is simply no way to guarantee in advance how long your student will need to finish her program. The main issue that we have is that research is inherently unpredictable, and if things don't work out right, it's difficult to say people can finish.
We can try to work with a student to plan to finish in a certain period of time, but we wouldn't try to guarantee that until the middle of the student's PhD progress.
I think you have the hidden assumption that a Ph.D. "program" is similar to a Master's "program". This is a very dangerous assumption, which is not true at all, and can cost you a lot of time if you don't "get" it quickly.
As a Master student (or similar degree), you are presented with knowledge somebody has compiled for you, and asked to learn it, as many people before you have done. At the end, you are given a well defined task of modest dimensions and difficulty, which is related to a possible job to the field you are majoring in. It's not a research level task, it's more of a task of the type which is typically solved by a professional in your field. And your supervisor knows how it should be solved, and can guide you if you are stuck. In the end, you finish it, document it, and this is your master thesis.
A Ph.D. position is a job position as a researcher (at least in Europe - I think it involves some credit taking in the USA). You are doing original research. You have to first find a topic which is interesting enough for the research community to get published, Goldilock-dimensioned so that the answers are not trivial but can hopefully be found in a reasonable amount of time, and fits with your supervisor's interests. Then you start finding the answers to your research questions. You are hampered by two things: 1) You have never done research before, so you are learning by doing, and 2) Nobody has ever found the answers to these questions before, so neither you nor anybody else can tell you how long it will take. Your supervisor will only be able to help so much.
The bottom line is that, if you manage to do very little mistakes, and also work overtime to correct the mistakes you've made, you'll just about manage in 3 years. If it takes you longer to figure out how to produce good research, and/or you don't work overtime, it will take you longer. And you will make mistakes. Most prospective Ph.D.s spend their time from 6 to 23 learning how to learn efficiently - but this skill is very different (although a prerequisite for) the skill of doing research efficiently.
In France there is a relatively strong policy of enforcing a fixed time frame for PhD theses, at least in STEM (things are very different in different fields, notably humanities tend to have longer PhD studies). The official duration of the PhD is 3 years, as in most Europe (the LMD system has uniformized that), and in many university a PhD student and her advisor will have to ask for a derogation and find additional funding in order to be allowed a fourth year. So, in principle it is possible to start a PhD with a three-year time frame planned, and it should in fact be the norm (but see below).
The above fact will probably astonish other answerers, as one in principle cannot pledge to find new pieces of knowledge in any given amount of time. I therefore feel it necessary to make a few observation about this before going on.
Please have a look at your last grant proposal before claiming that no one can pledge to make a significant discovery in a given amount of time.
There are two points of view on PhD duration: either we decide what is worth a PhD and have PhD students continue until they meet that standard or quit or are sacked; or we decide how much time should be spend for a PhD thesis and at the end of that time, depending on what was achieved it is decided to award the PhD or not (with the possibility that the PhD is awarded but with reports that make it clearly insufficient to continue in academia, a common event in my experience). Both points of view are conventions, none is intrinsically the good one. It happens that France has mostly the second point of view, with the provisio that derogations for a fourth year is pretty common, and even without it many applicants only defend a few month after taking another job (many European post-docs can be started before the PhD is awarded, provided it is close enough to completion).
These considerations are strongly field-dependent. Fields where researchers work on large teams can in principle (but see below) more easily have PhD student participate in projects whose completion in the next years make little doubts, while still having them learn how to do research. Some fields may be richer in subjects with low competition and high chance of success than others, etc.
However, I know from a very close relative that even making it clear at the beginning that a three-year long PhD is strongly wanted by the applicant, and even a clearly and definitely stated agreement by the advisor may not be sufficient to have your advisor really doing her best to make it happen¹. In experimental fields in particular, PhD students are close to free labor for the teams getting them, so it is a strong temptation to have them stay another year to have a stronger paper, and it is very difficult for a PhD candidate to measure by herself whether she has a case for defending earlier. In other words, my conclusion is even worse than that of other answers:
you should not consider a three-year PhD granted even if such a promise is made to you.
To end in a slightly more positive word, one of the key point is, as mentioned by another answerer, to choose your advisor wisely; in your case, this includes having a look at how long her former PhD students needed to defend, an information not always easy to track down.
¹ Which would include: assess honestly the difficulty and uncertainty of the proposed subject, giving access to tech help and helpful kits when time comes short, be available in a timely fashion for helping writing papers, accepting completion of a lesser, still publishable paper instead of a better paper that would take much more time to complete, etc.
If anyone knew in advance how long it would take to produce meaningful research results, it wouldn't be research worthy of a PhD Adding something worthwhile to human knowledge takes as long as it takes, and is subject to variation either because candidate capabilities vary or because unexpected problems arise. It is entirely possible that the research project fails entirely due to a basic flaw, and does so in a way which is not itself publishable, in which case you get to try again from the beginning.
Remember, even a BS degree sometimes runs over the nominal four years, and that should be much more predictable. (My BS thesis missed the due date by three days. And I should probably have dropped a few classes (and in retrospect should have changed majors slightly, which could have extended things.) PhD is, by design and intention, a larger and less predictable commitment.
You can probably find a school which will absolutely graduate in three years with a PhD... if you don't care that nobody else in the academic or business communities will respect that as a real PhD.
Your plans should allow for these possibilities. If you can't tolerate that risk, you may want to think again about whether you really want the PhD.
And, in fact, that's an important question: Why are you looking for this specific degree? It sounds like you're not patient/dedicated enough for this kind of research to be your career, so perhaps you should be looking at other paths such as engineering. For that purpose, an MS -- or a second MS -- might serve you better.
For that matter, even in academia there are fields where an MS is considered a "terminal degree" and -- together with some real-world experience -- would make you a suitable candidate for professorship. I know someone who's been looking at "Professor of Practice" positions, which are exactly this.
Take a step back, ask yourself whether you really want to earn a PhD or only to have earned it. If the latter, you probably aren't a good candidate for any respectable program.
In many places there is an limit after which you stop receiving funding (in Europe typically 4 years).
You can ask what are official PhD times and what are typical (usually: longer).
It is a great idea to talk in advance when it comes to advisor's expectations (e.g. how many papers and in journals of which rank) and expected time span. But at best, he can give you a honest estimate (perhaps: lower limit).
He cannot guarantee that you will do it at all, much less - in a given timeframe.
Yet, it is certainly possible to set a time and act accordingly. It may be wise to set it 6-12 month before the final deadline, as delays are rather a norm than an exception. So, if you want a contract which is de facto for 4 years, in many place it is doable.
I concur with the answers to the negative above. However, I would like to mention that most (+80%) of those who get their PhDs don't discover anything of value during their studies. This percentage may be somewhat lower at the more prestigious universities but is still well above 50%. So getting your PhD is mostly the result of you convincing your supervisor (and the committee) that you made the effort and learned something in the process. I got mine in less than 3 years and while I still managed to get a publication past the peer review I don't think Computer Science is any better as result of it. And while my uni is not prestigious I also happen to know similar cases (less than 3 years with modest or even non existing publication record) at top universities. So, nobody would expect miracles from you. At least, most supervisors wouldn't.
You have to be, however, very careful when choosing a supervisor. A supervisor can make or break a PhD. I know some who treated their students as rubbish and some who were father figures of sorts. So the quality of support varies drastically within the same university - and, again, this applies to top universities, too. I would advise you to talk to students of your prospective supervisor and find out how happy they are.
Judging from your comments on some of the answers, you did not ask the question you want answered. Your actual question seems to be:
I am not willing to spent more than three years in a PhD program abroad. It there a way to guarantee that I will obtain the degree in that time?
The answer is: No, there is not even a way to guarantee you'll get a PhD worth having at all!
Here's the basic concept behind the PhD degree: A PhD certifies that you have demonstrated the ability to conduct independent research that produced new results. And the duration to produce new results is inherently unknowable. It may take you one year, three years, or you may not be good enough to do it at all.
Any program that is guaranteeing that you will obtain a PhD in three years is either lying, or the corresponding institution is willing to set the bar for the degree so low that the degree wouldn't have any worth, because it does not certify your ability to do anything. In the former case, you wouldn't necessarily obtain a PhD in three years; in the latter case you would essentially just be guaranteed to obtain a worthless piece of paper with your name and the text "PhD" on it. The degree would only certify that the institution stood by their guarantee to award you the degree after three years. It would not certify any ability on your part.
But I don't think the lack of a guarantee should stop you from pursuing a PhD abroad even if you are not currently willing to spent more than three years abroad: I am guessing you did not have a guarantee that you would obtain a Master'a degree either. You just had to try. And if you hit any serious problems or delay, you had to decide for yourself whether the Master's degree was still worth pursuing. It that respect, the PhD is not less certain than the Master's was. You just start despite the uncertain outcome, and you continuously evaluate whether the goal is still worth achieving along the way.
Reading more of your comments on already given answers, I think two of your underlying assumptions on this issue are wrong, and lead you to have unrealistic expectations.
The first assumption seems to be:
Master's degrees have a fixed time frame. If a PhD program does not, then that is due to organizational deficiencies on part of the supervising professor or the institution.
And thus you seem to look for an institution or supervisor that does not have that deficiency, or a way to mitigate its effects.
But there is no deficiency! A master's program can have a fixed time frame, because it only teaches stuff that is already known and has been taught before. Your job as a Master's student is to learn that pre-determined set of abilities and apply it to pre-determined problems in a pre-determined time frame.
But a PhD program is nothing like that. There is nobody telling you what to learn, and which knowledge or abilities to apply to which problem. And that lack of a structure is not a deficiency, but is the core idea of, and therefore inherent in a PhD program: A PhD certifies that you were able to produce new scientific results independently and under these uncertain conditions. If a PhD program was structured like a Master's program, the PhD degree would only certify the same abilities as the Master's degree you already have, and thus would be pointless.
Your second assumption seems to be
I got a "degree either in X years or not at all" guarantee for my Master's. Such a guarantee is useful, and I therefore want it for my PhD as well.
But that guarantee for the Master's was no guarantee of success at all. Rather, it was an additional restriction! All degrees certify that you achieved a certain level of proficiency in a given field. For your Master's, that "degree either in X years or not at all" guarantee was simply the additional restriction, that they will only give you X years to achieve that level of proficiency, and won't give you any degree at all if it takes you any longer. A PhD simply does not have that additional restriction. So not having what seems to be a guarantee actually makes obtaining the degree easier.
The bottom line is: You don't need that 3-year guarantee. It only means that somebody else is allowed to force you to abort your efforts of obtaining the degree. Not having that guarantee actually gives you the freedom to decide when and whether to abort, or to continue your efforts. If you need it, you can easily give you your own "three years at most or no degree at all" guarantee by deciding beforehand that you will leave the PhD program after three years. That would have exactly the same consequences for you as the guarantee you are trying to obtain.
FUNDING and duration of PhD work are, as some other commenters point out, are two different things. In Switzerland, at least, many PhD students in the sciences have 3 years of funding if they receive money from the Swiss National Science Foundation. The Teacher Training Universities offer 4 years of funding. Of course, how long it takes to complete a PhD program depends so much on the student and on the advisor AND on how well they work together. Advisors can sometimes offer office space and/or additional funding to support students when their PhD work goes beyond their originally funded period.