JavaScript and PHP are both dynamic and interpreted languages. PHP is very convenient and is found in many projects. But now Javascript seems unavoidable. Whatever...
JavaScript: client-side programming language
JS has been good progress in recent years and serves on the browser as on the server (with Node JS among others). JavaScript is a language that is read and executed by your browser - the client - (so directly on your computer) and can create reactions in response to events on the page or user actions. JavaScript is able itself to write code X / HTML or CSS, and thus completely change the basis of a Web page.
PHP: server-side programming language
PHP is a language that is read and executed on the server where the page X / HTML before it is sent to the browser (client) that requests the display. For example, you filled out a form and clicked on the button, the server receives the data sent by the browser, the PHP code processes the data and writes the X / HTML of the new Web page that the Web server then sends to the browser.
The XHTML code of a page can be completely written by using PHP, or PHP code can be inserted at a specific location of a page to complete the X / HTML. It refers to "dynamic" pages where all or certain parts are written in PHP because it is a programming language that modifies or complete the code X / HTML "static" page.
Why get rid of Javascript?
While JavaScript is currently enjoying great popularity in the world of computer programming languages, a developer aims to end its use in dynamic Web pages. Bobby Mozumder, editor in chief of FutureClaw fashion magazine and Web developer, has proposed a new track for dynamic execution of HTML pages without using JavaScript to reduce the loading time of web pages. For him, the fact of load and compile JavaScript every call is a waste of time. Its objective is to define a standard that takes browsers to incorporate HTML features that will dynamically run applications designed on a single page without using JavaScript.
More information with our php developers !