JavaScript Vs PHP

Notes:

Difference between JavaScript and PHP:

Type of scripting language:
JavaScript is a client side scripting language
PHP is a server side scripting language

Platform Independent:
Both JavaScript and PHP are platform independent

Case sensitive:
Both JavaScript and PHP are case sensitive

Access to database and file system:
JavaScript has no ability to access database and file system
PHP can access database and file system

Programming paradigm:
JavaScript is a prototype based or object based
PHP is a class based or object oriented

Can be embedded in HTML:
JavaScript codes can be embedded in HTML code using script tag
PHP codes can be embedded in HTML code using php tag

Security:
JavaScript is considered as less secure
PHP is considered as more secure

Interview Questions: