I think that it is always better to first prototype an MVP.
Users may not know what they want but they certainly know what they don't want when they see it.
PHP and especially JS are eminently suitable for the purpose of prototyping. Furthermore, most software won't make it past the prototype stage anyway.
If it does, like the initial PHP code for Facebook, then at least it's worth reengineering. Facebook took control of the PHP scripting environment by replacing it first by HipHop for PHP (HPHPc) and then by HipHop Virtual Machine (HHVM).
If the internal data structures of the application are for business reasons immensely flexible, then porting the code to a system language won't make any difference anyway.
For example, porting Facebook to C, C++, or Rust won't make any difference. They even tried generating C with HPHPc but to no avail. Deeply nested arrays and objects, i .e. full-on JSON, yield very flexible data structures. They are not faster to deal with in a system language. Strongly typing hierarchical tree data structures doesn't work either. It won't be any safer than dynamically typing.
Hence, these awful scripting languages are almost always the better choice.