Zend engineBased on the build, achieved a
WebA completely new operating environment outside of development.
Project official website library:
Welcome friends a lot of star ^ _ ^
Why launch the polarphp project
PHPMarket share is gradually being eaten, and
PHPThe official is still sticking to
WebIn the field of programming, the more things you want to keep, the more you can't keep it.
PHPSome ancient deprecated features and strong
WebAttributes by implementing a new set of runtime frameworks
PHPLanguage is a true universal scripting language, empowering
PHPLet it have asynchronous programming, coroutines, threads, built-in
UnicodeSupport, standard file
IOAnd so on, let
PHPProgrammers can not only do
WebApplications can also face real server applications with ease.
Infrastructure provided by polarphp
Directly facing the terminal, remove it
SAPISo that the server environment can be better realized.
OPCODEForm a specification to provide a similar
PycThe precompilation mechanism for files.
Provide native multi-threading support, learn from
JavaA programming paradigm in terms of multithreading.
Provide native asynchronous
Provide for strings
Provide a brand new package organization, built-in package dependency management tools, similar
APIDocument generation tool.
Polarphp roughly architecture
The project is mainly composed of three parts, mainly including the following three sub-modules
The approximate relationship of this module is as follows:
Polarvm <=> zendAPI <=> libpdk
Realize the current stage
Zend engineEncapsulation to achieve the most basic
PHPExecution environment, such as implementation:
Implement the underlying runtime environment, implement variable operations, array operations, class loading mechanisms, language reflections, and more.
Zend engineThe initialization, the language engine and the terminal link, to achieve direct control of the standard input and output of the language engine.
Implement a callback mechanism between the language engine and the standard library.
Introduction to zendAPI
PHPExtended friends should know that when we develop extensions,
Zend engineMany of the interfaces are provided by means of macro calls. The types are not safe, the debugging is not good, and some macros are still very special. It is especially cumbersome to manipulate arrays.
GcIs achieved by reference counting, while
CThere is no language that helps us manage the counting mechanism from the language level, so managing memory when we write extensions is not only cumbersome but also causes memory leaks if we are not careful. Especially when copying and
PHPWhen using references between variables together, it is very difficult to get a headache.
If our standard library is directly based on native
Zend engineInterface, it is bound to expand, maintainability will be seriously affected, especially at present
Polarvmis based on
Zend engineUnder the considerable circumstances of secondary development. So implement a shield between the language engine and the standard library, and implement the pair
Zend engineThe native interface is packaged to provide a relatively stable and simple object-oriented
The zendAPI provides the following features:
Fully object oriented, right
Zend Engine APISecondary definition
C++11Grammar for development, easy to maintain
PHPThe impact of the version on extended development,
zendAPIWill be right
Zend Engine APIDifferent versions bring out the difference
High coverage unit testing to ensure code quality
As much as possible to ensure performance when packaging
Committed to binary compatibility of project libraries
Libpdk introduces the development plan of polarphp
Due to limited development resources, the development plan is tentatively scheduled as follows:
Zend VMCompile and generate
PHPLanguage virtual machine.
Language support project, language testing framework, porting
PolarphpThe driver implements PHP code from the command line.
PolarphpThe virtual machine performs regression testing and tentatively runs the language virtual machine related regression test of PHP.
Publishing core virtual machines
Achieve user-friendly installation, try to do it in the least possible steps
Implement the package manager.
Implement language-assisted gadgets, such as document generation tools.
Polarphp current status
The project is currently in a very early stage, through
DockerMirror to achieve the iterative release of the project, currently I am mainly developing in my spare time, welcome everyone to play. An important task in 2019 is to improve
LibpdkAnd achieving mainstream
LinuxStable operation on the operating system.
How to participate
At present, we only target Chinese users for the time being, so we use the communication method of WeChat and QQ group. The following is the QR code. Interested students can scan the code to join:
Currently have the following working groups
Language core team
Standard library team
Eco-chain project team