Home >Backend Development >PHP Problem >Is php written in c language?

Is php written in c language?

(*-*)浩
(*-*)浩Original
2019-09-18 09:21:084385browse

php's interpreter is written in c. The interpreter is equivalent to a weak compiler, but php itself is not based on some underlying language.

Is php written in c language?

PHP is a scripting language executed on the server side, similar to C language, and is a commonly used website programming language. It drives more than 200 million websites around the world, and more than 81.7% of the world's public websites use PHP on the server side. PHP's commonly used data structures are all built-in. It is convenient and simple to use, not complicated at all, and its expression ability is quite flexible. (Recommended learning: PHP programming from entry to proficiency)

The core of the PHP language is written in C language.

php’s zend engine is entirely implemented in pure C language. The zend engine is the core part of php. It compiles php code into executable opcode processing and implements corresponding processing. The processing method, implements basic data structures (such as hashtable, oo), memory allocation and management, and provides corresponding API methods for external calls, which is the core of PHP.

Main features

(1) Open source and free nature

Because the source code of the PHP interpreter is public , so websites with higher security factors can change the PHP interpreter by themselves. In addition, the use of the PHP runtime environment is also free.

(2) Quickness

PHP is a language that is very easy to learn and use. Its grammatical features are similar to C language, but there is no C language. The language has complex address operations, and it also incorporates object-oriented concepts. In addition, it has concise grammatical rules, making it very simple to operate and edit, and highly practical.

(3) Extensibility of database connections

PHP can establish connections with many mainstream databases, such as MySQL, ODBC, Oracle, etc. PHP is compiled using Different functions establish connections with these databases, and PHPLIB is a commonly used base library provided for general transactions.

(4) Use process-oriented and object-oriented together

In the use of PHP language, you can use process-oriented and object-oriented respectively, and PHP can be process-oriented and object-oriented. Object-oriented and object-oriented are mixed together, which is something that many other programming languages ​​cannot do.

The above is the detailed content of Is php written in 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