|PHP is used mostly for Back-end
|Execution environment: Browser
|Execution environment: Server
|HTML is the only supported combination with PHP.
|PHP code is more secure.
|File extension: .php
|File extension: .js
|It is faster.
|It is slower.
|Dynamic sites and do various other tasks, and a PHP application is required.