mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 22:08:55 +00:00

- PHP 3 development appendix moved to this part - Streams API docs moved to this part - ZendAPI docs with figures integrated in this part More info: http://news.php.net/php.doc/969369673 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@194089 c90b9560-bf6c-de11-be94-00142212c4b1
99 lines
3.7 KiB
XML
99 lines
3.7 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
<!-- $Revision: 1.1 $ -->
|
|
|
|
<sect1 id="zend.overview">
|
|
<title>Overview</title>
|
|
<para>
|
|
"Extending PHP" is easier said than done. PHP has evolved to a
|
|
full-fledged tool consisting of a few megabytes of source code,
|
|
and to hack a system like this quite a few things have to be
|
|
learned and considered. When structuring this chapter, we finally
|
|
decided on the "learn by doing" approach. This is not the most
|
|
scientific and professional approach, but the method that's the
|
|
most fun and gives the best end results. In the following
|
|
sections, you'll learn quickly how to get the most basic
|
|
extensions to work almost instantly. After that, you'll learn
|
|
about Zend's advanced API functionality. The alternative would
|
|
have been to try to impart the functionality, design, tips,
|
|
tricks, etc. as a whole, all at once, thus giving a complete look
|
|
at the big picture before doing anything practical. Although this
|
|
is the "better" method, as no dirty hacks have to be made, it can
|
|
be very frustrating as well as energy- and time-consuming, which
|
|
is why we've decided on the direct approach.
|
|
</para>
|
|
<para>
|
|
Note that even though this chapter tries to impart as much
|
|
knowledge as possible about the inner workings of PHP, it's
|
|
impossible to really give a complete guide to extending PHP that
|
|
works 100% of the time in all cases. PHP is such a huge and
|
|
complex package that its inner workings can only be understood if
|
|
you make yourself familiar with it by practicing, so we encourage
|
|
you to work with the source.
|
|
</para>
|
|
|
|
<sect2 id="zend.overview.whatisit">
|
|
<title>What Is Zend? and What Is PHP?</title>
|
|
<para>
|
|
The name <emphasis>Zend</emphasis> refers to the language engine,
|
|
PHP's core. The term <emphasis>PHP</emphasis> refers to the
|
|
complete system as it appears from the outside. This might sound
|
|
a bit confusing at first, but it's not that complicated (see
|
|
<xref linkend='fig.internal-struct'/>). To implement a Web script interpreter, you need
|
|
three parts:
|
|
<orderedlist>
|
|
<listitem>
|
|
<para>
|
|
The <emphasis>interpreter</emphasis> part analyzes the input
|
|
code, translates it, and executes it.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
The <emphasis>functionality</emphasis> part implements the
|
|
functionality of the language (its functions, etc.).
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
The <emphasis>interface</emphasis> part talks to the Web
|
|
server, etc.
|
|
</para>
|
|
</listitem>
|
|
</orderedlist>
|
|
Zend takes part 1 completely and a bit of part 2; PHP takes parts
|
|
2 and 3. Together they form the complete PHP package. Zend itself
|
|
really forms only the language core, implementing PHP at its very
|
|
basics with some predefined functions. PHP contains all the
|
|
modules that actually create the language's outstanding
|
|
capabilities.
|
|
<figure id='fig.internal-struct'>
|
|
<title>The internal structure of PHP.</title>
|
|
<graphic fileref="figures/zend.01-internal-structure.png"/>
|
|
</figure>
|
|
</para>
|
|
<para>
|
|
The following sections discuss where PHP can be extended and how
|
|
it's done.
|
|
</para>
|
|
</sect2>
|
|
</sect1>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|