Overview of various programming languages

Source: Internet
Author: User
Tags microsoft iis

PHP is an abbreviation for the hypertext Pre-processor (hypertext Preprocessor), which is a server-side HTML scripting/programming language. PHP is syntactically similar to C and can run on Apache, Netscape/iplanet, and Microsoft IIS WEB servers.

The difference between PHP and Java:

PHP has a class keyword similar to java. because you don't need a virtual machine, it's 5 times times faster than Java .

The difference between PHP and javascript:

PHP allows you to write simple scripts directly in the HTML file, which is very similar to JavaScript. The difference is thatPHP is not dependent on the browser, is the server-side language , read the database to display content to the page, but JavaScript is a client embedded in the HTML language , control the content of the page.

The difference between JavaScript and Java

1. Developed by different companies. Java is the product of Sun Microsystems, and JavaScript is the product of Netscape, and Java is licensed by Sun Microsystems Corporation.

2. JavaScript isbased onobject and Event drivenscripting language, which itself provides a very rich internal object; Java isforObject, even if you are developing a simple program, you must design the object. 3. The embedding method is different. JavaScript uses 4. Does not perform the same way in a browser. JavaScript is an explanatory programming language, and the source code does not need to be compiled before the client executes the Web page, i.e. the JavaScript statement itself is downloaded along with the webpage.interpreted by the browser execution; andJava code must be compiled before it is passed to the client for execution, the compiler is not required on the client, but there must be an emulator or an interpreter. It is possible to implement compiled code independent of a particular platform through a compiler or interpreter. 5. Variables are different. JavaScript's variable declaration takes a weak type, that is, the variable does not need to be declared before it is used, but the interpreterat run timeCheck its data type (this is called dynamic linking); Java uses a strongly typed variable check with static linking,at compile timeThe strong type check is implemented.

The difference between Java and C + +:

1. Fully object-oriented, such as: The main function is included in the class as static

2. Java Cross-platform, that is, different operating systems can be interpreted by the JVM Java programs, and C, C + +, C # is platform-related , and some instructions only in some operating systems to execute;

3.Java does not support system calls, that is, it cannot interact with the operating system, which is determined by its cross-platform characteristics, while C can invoke instructions in the system, such as fork (). This is why Java has only threads (thread) concepts and no process concept, and C has both;

4. Java cannot control memory, whereas C can manually allocate memory through pointers.

5. The default member of the class is protect (private in C + +)

6. A string in C + + is equivalent to a const string in Java in stringbuff;c++, which is equivalent to a string in Java. In other words, a string in C + + is mutable, whereas a string in Java is immutable. So when using the + operation in Java to merge strings, you are actually re-applying for new space and assigning two strings to the new space.

7. An array of Java cannot directly specify the number of columns or the number of rows, such as String s[50], at the time of declaration. The correct approach is to:

String s[] = new STRING[50];

Overview of various programming languages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.