Zend.com: Under The Hood of PHP 4 | Linux Today

Zend.com: Under The Hood of PHP 4

Written By
Web Webster
Web Webster
Mar 12, 2000

“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

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.