There are other languages that can behave like this, Ruby ERB templates are one that can be done the same way. You can't just drag and drop PHP without some initial server side configuration either.
The reason it's nearly 2019 and no other language does this is because it's a really terrible way to manage software deployment.
The reason it's nearly 2019 and no other language does this is because it's a really terrible way to manage software deployment.