As a web developer I know I can communicate between multiple languages using GET and POST, but that involves having at least one file per language even if all those files are only used together and for only one task.
One thing I have not been able to find information on (even information completely denying/disproving the idea) is having all those multiple languages in a single file and have each language processed by the server - specifically in such a way that the order in which the languages are used doesn't matter, so that variables/functions can be used interchangeably. The closest thing I have found to this is SNAP, but even that simply reproduces the functions, not actually making them directly usable in an interchangeable manner.
All the information I can find about language interoperability is focused on having the languages separate, which leads me to believe that same-file interoperability cannot work (at least between non-related languages, like combining PHP with ASP.Net) but I would like to have this clarified.