I've only heard PHP is terrible (e.g. in the context of Mt. Gox) and a more efficient/more security-oriented language would be preferable for matching orders and account security. Which programming language, and due to what reasons, would be better?
There is no possible way of knowing what are the technologies used by the exchanges.
C++, C# and C have been typically used by the financial and trading software industry as they can be optimized for low latency / high frequency behavior needed for real-time trading. Java, F#, Python, VBA, Haskell as well as other programming languages have also been used but it all comes to a matter of a personal taste, what technologies you or your team are familiar with, what open source (or not) modules are out there that will prevent you from reinventing the wheel and much more that are out of the context of this forum.
Another way to get an idea for the technologies used by an exchange is to spy on its job adverts. Still, what you'll get might not be accurate or it might refer to another or new product or service of that exchange, or even a migration of the existing technologies towards some other but still you'll get an idea.
A lot of financial industry prefers Python. Some remarkable Bitcoin exchanges, like Bitstamp and LocalBitcoins are built on the top of Python and Django web framework (though there exist other web frameworks you might want to use).
The reasons to choose Python include
Open source ecosystem with a lot of modules to choose from, like ones for Bitcoin
It is not only web development language, but has large use base in scientific computing, making it ideal for data analysis and number crunching (see e.g. IPython, NumPy projects). This makes Python different from Ruby, which is more heavily web only.
Unlike more static languages, like Java and C#, which optimize CPU-bound performance, Python optimizes development time, making it very productive. You can always port your code to more heavy platform if your service grows popular and you have money to spend. This is especially important if your project is not backed up by a big corporation, but more startup oriented.
TL;DR I would use Scala, F# or Rust. If you don't like FP, then Java/C#.
Statically typed: The reason I would avoid Php, and most other dynamically typed languages, is to avoid bugs. Dynamically typed langs are easy to learn and code, but a statically typed lang like Java / C# will avoid a certain kind of bugs, and make refactoring easier.
Automatic memory management: I would also avoid langs where you manage memory, like C/C++, mostly because I fear bugs. Remember Heartbleed? That category of bugs can only happen when the programmer manages memory. Rust/Go are better.
Functional: I know that FP is considered hard, but it is a way to avoid bugs, especially if you are running a multithreaded app where the threads communicate with each other (like trading). FP's most important feature is that you work with immutable data structures. Functional langs are Haskell, F#, Scala and Erlang.
Python is too slow for exchange job. Some rates Python about five times slower than Java. Java is not acceptable either. Mostly for VM/GC and somehow dirty code practices often employed by Java developers. C++ is gold standard for performance AND huge waste of time – tedious and long work required. However, usually code is high quality as developers forced to clean after themselves. Apparently it enforces good practices after years of practice. Then there are couple of exotic languages like Erlang and Go, would suit the requirements. Erlang promises to screw your brains and waste a lot of time – see C++. If you’ll get though of it - results might be good. Go seems to be the simplest choice specifically tailored for parallel processing. Not sure if it fits to financial application needs.
Checking the partial UI rendered pages for
Cryptsy it seems they are using jquery, bootstrap
coinsquare is using fast-cgi, Angularjs, Angularjs
coinsetter seems to be using Java, jquery, bootstrap.js
Mtgox famously used PHP
It really depends upon the skill your team have or is willing to learn.
Building a thin client over HTML5, Angularjs, bootstrap, nodejs, Java are common denominator among many exchanges.
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.