Home  >  Article  >  Backend Development  >  The difference between php language and c language

The difference between php language and c language

(*-*)浩
(*-*)浩Original
2019-10-08 13:43:384183browse

If you have learned C language and now want to learn PHP, the first step is of course to master the basic syntax. The basic syntax of PHP is very similar to C, but there are some unique features.

The difference between php language and c language

First of all, let’s clarify an idea. The biggest difference between PHP syntax and C is that PHP emphasizes practicality, while C emphasizes principles.

Learning the syntax of C and cultivating rigorous thinking habits are very helpful for understanding the working principle of computers. If a person who has learned C starts to learn PHP, he will feel uncomfortable with PHP's too loose syntax. (Recommended learning: PHP video tutorial)

The founder of PHP designed PHP to update his homepage, not to develop an operating system like the founder of C. These are two The fundamental reason for the different grammatical styles

PHP is the "hypertext preprocessor" and is a general open source scripting language. PHP is a scripting language executed on the server side. It is similar to C language and is a commonly used website programming language. PHP's unique syntax mixes C, Java, Perl, and PHP's own syntax. It is conducive to learning and widely used. It is mainly suitable for the field of web development.

C language is a process-oriented, abstract, general-purpose programming language that is widely used in low-level development. C language can compile and process low-level memory in a simple way. C language is an efficient programming language that only generates a small amount of machine language and can run without any operating environment support.

Although the C language provides many low-level processing functions, it still maintains cross-platform characteristics. C language programs written in a standard specification can be used in tasks such as embedded processors and supercomputers. The platform is compiled on many computer platforms.

Difference

1. PHP is a server scripting language and must be run on a server that can parse PHP

2.C language It is a low-level language, and PHP is a high-level language

3.C language is a strongly typed language, and PHP is a weakly typed language. This can be seen from the difference in syntax between the two

4, PHP is mainly used for web applications, and C language is mainly used for low-level computer applications. In addition, C language is much more powerful than PHP. You should know that PHP is written in C language

The above is the detailed content of The difference between php language and c language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn