File: overview.xml

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (102 lines) | stat: -rw-r--r-- 3,993 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision: 297078 $ -->

 <sect2 xml:id="internals2.ze1.zendapi.overview" xmlns="http://docbook.org/ns/docbook"> 
  <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> 
  
  <sect3 xml:id="internals2.ze1.zendapi.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 (
    <link linkend="internals2.ze1.zendapi.fig.internal-struct">see
     below</link>). 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.
    <mediaobject xml:id="internals2.ze1.zendapi.fig.internal-struct">
     <alt>The internal structure of PHP.</alt>
     <imageobject>
      <imagedata fileref="en/internals2/ze1/zendapi/figures/zend.01-internal-structure.png"/>
     </imageobject>
    </mediaobject>
   </para> 
   <para>
    The following sections discuss where PHP can be extended and how
    it's done.
   </para>
  </sect3>
 </sect2>
<!-- 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:"~/.phpdoc/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
-->