It's worth noting that PHP to C++ compiler also exists. It so happens that duck typing and values-not-variables-are-typed (this can be trivially shown**) map pretty cleanly to static languages. (Not surprising because of template concept).

The part that doesn't map well is metaprogramming (eg: PHP's eval()), but that's to be expected. But that's a small part of it all, and guess what I've yet to meet a static language that doesn't have some kind of metaprogramming (or hacky way to accomplish something similar) because metaprogramming is often useful.

Dynamic: a = 5; print(a); a = "foo"; print(a);
Converted to Static: a = 5; print(a); del(a) /* optional */; a' = "foo"; print(a');