Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs

Partner Sites
JustLinux.com
Linux Planet
PHPBuilder
Technology Jobs

Top White Papers

  • The penetration of virtual servers is approaching 50 percent in IT infrastructures, yet administrators are only backing up, on average, 68 percent of their...
    Download

  • Increasing demands placed on IT, along with tightening budgets has prompted IT leaders to seek out alternative technologies and improved methods of providing...
    Download

More on LinuxToday


Zend.com: Under The Hood of PHP 4

Mar 12, 2000, 16:11 (0 Talkback[s])
(Other stories by Zeev Suraski)

"By the time you read this article, PHP 4.0.0 is in final release stages. Since PHP 4 is by far the most advanced version of PHP, I wanted to share with you an inner look at what makes this open source freeware tick. Many of the most important features of PHP 4, such as the replacement of the scripting engine and modularization, are transparent to end users. Nonetheless, these are exactly the features that make the difference between a stable, efficient and reliable Web scripting solution, and a less stable solution...."

"If PHP 3 was so great and popular, what in the world made us write it from scratch, all over, again? In simple terms, we weren't being creative enough. While we did switch to a much reliable approach in our parser (which analyzed the entire script, instead of line-by-line), we didn't question the very nature of PHP, which was: "execute the code while reading it."

"PHP, throughout all of its versions, always "understood" (parsed) and executed the code simultaneously. This was one of the main reasons PHP was so quick with short, simple scripts; there was minimal startup time and it included simple data structures necessary for the implementation. On the other hand, this meant that PHP became less and less efficient as scripts began to be more and more complex, due to the need to repeatedly parse the same parts of the file in many cases, such as loops or repetitive function calls."

Complete Story

Related Stories: