Difference Between PHP And JavaScript In Tabular Form.
S.No | Basic Terms | PHP | JavaScript |
1. | Full Form | Hypertext Preprocessor | It Call as JavaScript |
2. | Logo | ||
3. | Meaning | PHP runs on server and the major functionality of PHP is to produce the HTML code which will be read by browser. | JavaScript can handle only local tasks that are specific. |
4. | First Appeared | 1995 | December 4, 1995; |
5. | Developed by | Rasmus Lerdorf in 1994 | Brendan Eich |
6. | Type of Format | Programming Language | Scripting language |
7. | Implementation Use | Server-side in web browsers | client-side in web browsers |
8. | Filename Extensions | .php | .js |
9. | Where it Runs | PHP code will executed on Web servers with apache server. PHP does not execute within a browser’s window. | It is interpreted on client web browsers. JavaScript executes within a browser’s window. |
10. | Combination With | PHP is embedded only with HTML and PHP cannot be combined with XML. | JavaScript can be combined with HTML, XML and AJAX. |
11. | Where It Use | PHP is used to produce web pages on the go, read and deploy databases, import the files available on the server, and gain files of data from further domains. | JavaScript can import files of information available by mentioning the URL of the file in the address bar of the browser. |
12. | Database use. | PHP commonly uses MYSQL as a database. | MYSQL is not commonly used by JavaScript. |
13. | Usage | Functions ,If Else Statements Loops etc | Validation , functions ,If Else Statements Loops etc |
14. | Versions | 1.0 8 June 1995 2.0 1 November 1997 PHP 3 6 June 1998 PHP 4 22 May 2000 PHP 5 13 July 2004 PHP 6 and Unicode 2005 PHP 7 During 2014 and 2015, | JavaScript Version Year JavaScript 1.0 1995 JavaScript 1.0 (JScript 1.0) 1996 JavaScript 1.1 1996 JavaScript 1.2 1997 JavaScript 1.2 (JScript 3.0) 1997 JavaScript 1.3 1998 JavaScript 1.3 (JScript 5.0) 1999 |
15. | Example | <?php echo “Hello World”; ?>
| <!DOCTYPE html> <html> <body> <h3>My Simple JavaScript Code</h3> <button type="button" onclick="alert('hello World')">Hello World</button> </body> </html>
|
(Visited 228 times, 1 visits today)
Written by: