JavaScript vs. PHP , which is better?

JavaScript Logo

JavaScript

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm.

PHP

PHP: Hypertext Preprocessor is a server-side scripting language designed for web development but also used as a general-purpose programming language.

PHP Logo

Difference and similar

Website

JavaScript

developer.mozilla.org/en-US/docs/Web/JavaScript

PHP

php.net

Paradigm

JavaScript

Multi-paradigm: object-oriented (prototype-based), imperative, functional, event-driven

PHP

Imperative, functional, object-oriented, procedural, reflective

Designed by

JavaScript

Brendan Eich

PHP

Rasmus Lerdorf

Developer

JavaScript

Netscape Communications Corporation, Mozilla Foundation, Ecma International

PHP

Zend Technologies

First appeared

JavaScript

December 4, 1995

PHP

1995

Stable release

JavaScript

June 2017

PHP

April 26, 2018

Typing discipline

JavaScript

Dynamic, duck

PHP

Dynamic, weak

License

JavaScript

PHP

PHP License (most of Zend engine under Zend Engine License)

Filename extensions

JavaScript

.js

PHP

.php, .phtml, .php3, .php4, .php5, .php7, .phps, .php-s

Popular Framework

JavaScript

  • AngularJS
  • VueJS
  • ReActJS
  • Knockout

PHP

  • Laravel
  • Zend

Type

JavaScript

Scripting Language

PHP

Scripting Language

Syntax

JavaScript

PHP

JavaScript and PHP reviews

comparman

compargram

@comparman

JavaScript

Well, it's fast, easy, cool, fun, easy to understand, great, huge, and amazing (just to list a few).

comparman

compargram

@comparman

JavaScript

JavaScript is easy to learn for beginners, and it feels really good when you accomplish a really hard problem after staying up all night working on it. 

comparman

compargram

@comparman

JavaScript

Quirky but dynamic and widely distributed language. Would use again.