xref: /web-php/manual/php3.php (revision c0afd74b)
1<?php
2$_SERVER['BASE_PAGE'] = 'manual/php3.php';
3include_once __DIR__ . '/../include/prepend.inc';
4site_header('PHP Version 3 Documentation');
5?>
6
7<h1 style="text-align: center;">PHP Version 3</h1>
8
9<h1>Table of Contents</h1>
10
11<ol>
12  <li><a href="#introduction">Introduction</a></li>
13  <li><a href="#directives">Configuration Directives</a></li>
14  <li><a href="#changed_behaviour">Changed behaviour</a></li>
15  <li><a href="#misc">Miscellaneous</a></li>
16  <li><a href="#migration">Migration</a></li>
17  <li><a href="#debugger">Debugger</a></li>
18  <li><a href="#internals">Internals</a></li>
19</ol>
20<hr>
21
22<h2 id="introduction">Introduction</h2>
23
24<p>
25 The PHP 3 documentation was removed from the PHP Manual and placed here for
26 historical purposes. An attempt was made to preserve all of the text although
27 it's highly likely that some is missing. The last PHP 3 release (3.0.18) was
28 made on October 20, 2000.
29</p>
30
31<p>
32 See the <a href="http://museum.php.net/">PHP Museum</a> for downloads, and
33 also read the <a href="http://php.net/history">history</a> for further
34 information about PHP 3.
35</p>
36
37<h2 id="directives">Configuration Directives</h2>
38
39<p>
40 Most directives are prepended with php3_ instead of php_. These differences
41 are not mentioned in this document.
42</p>
43
44<dl>
45 <dt><span class="big">Changed</span></dt>
46 <dd>
47  <p>
48   FTP configure option changed from <em>--with-ftp</em> to <em>--enable-ftp</em>
49  </p>
50 </dd>
51 <dd>
52  <p>
53   The value of E_ALL is 63.
54  </p>
55 </dd>
56 <dd>
57  <p>
58   The <em>asp_tags</em> directive was added in PHP 3.0.4.
59  </p>
60 </dd>
61 <dd>
62  <p>
63   The E_* constants have no meaning in <em>php3.ini</em>, but numeric values do.
64  </p>
65 </dd>
66</dl>
67
68<dl>
69 <dt><span class="big">Removed</span></dt>
70 <dd>
71  <p>
72   <em>--with-imsp[=DIR]</em> includes IMSP support (DIR is IMSP's include dir and libimsp.a dir).
73  </p>
74 </dd>
75 <dd>
76  <p>
77   <em>--with-mck[=DIR]</em> includes Cybercash MCK support. DIR is the cybercash mck build directory,
78   defaults to /usr/src/mck-3.2.0.3-linux
79  </p>
80 </dd>
81 <dd>
82  <p>
83   <em>--with-mod-dav=DIR</em> includes DAV support through Apache's mod_dav, DIR is mod_dav's
84   installation directory (Apache module version only).
85  </p>
86 </dd>
87 <dd>
88  <p>
89   If the <em>sybase.compatability_mode</em> directive is on, this will cause
90   PHP to automatically assign types to results according to their Sybase
91   type, instead of treating them all as strings.
92  </p>
93 </dd>
94</dl>
95
96<h2 id="changed_bahaviour">Changed Behaviour</h2>
97
98<dl>
99 <dt><span class="big">Return values</span></dt>
100 <dd>
101  <p>
102   unset() returns 1.
103  </p>
104 </dd>
105 <dd>
106  <p>
107   Multiple calls to setcookie() in the same script will be performed
108   in reverse order. And put the insert before the delete when trying
109   to delete one cookie before inserting another.
110  </p>
111 </dd>
112 <dd>
113  <p>
114   eval() does not return a value.
115  </p>
116 </dd>
117</dl>
118
119<dl>
120 <dt><span class="big">Function parameters</span></dt>
121 <dd>
122  <p>
123   gettype() has a 'user function' return value.
124  </p>
125 </dd>
126 <dd>
127  <p>
128   htmlspecialchars() added the second parameter in PHP 3.0.17.
129  </p>
130 </dd>
131 <dd>
132  <p>
133   error_log()'s second parameter, message, goes through the debugger.
134  </p>
135 </dd>
136 <dd>
137  <p>
138   empty() considers "0" as non-empty, a value that for example may come from an HTML form.
139  </p>
140 </dd>
141</dl>
142
143<dl>
144 <dt><span class="big">Other</span></dt>
145 <dd>
146  <p>
147   Variables are always assigned by value, as there are no references.
148  </p>
149 </dd>
150 <dd>
151  <p>
152   Using arrays within HTML forms is limited to single dimensional arrays.
153  </p>
154 </dd>
155 <dd>
156  <p>
157   When escaping characters in single quoted strings, an E_NOTICE level error is generated.
158  </p>
159 </dd>
160 <dd>
161  <p>
162   Objects lose their class association throughout the process of serialization and unserialization.
163  </p>
164 </dd>
165 <dd>
166  <p>
167   Functions must be defined before use. In other words, top to bottom.
168  </p>
169 </dd>
170 <dd>
171  <p>
172   Variable number of arguments are not supported.
173  </p>
174 </dd>
175 <dd>
176  <p>
177   Return may only be used within function blocks.
178  </p>
179 </dd>
180</dl>
181
182<h2 id="miscellaneous">Miscellaneous</h2>
183
184<dl>
185 <dd>
186  <p>
187   The PCRE modifier is not available.
188  </p>
189 </dd>
190 <dd>
191  <p>
192   is_uploaded_file() exists as of PHP 3.0.16.
193  </p>
194 </dd>
195 <dd>
196  <p>
197   BC Math is enabled by default, --disable-bcmath disables it.
198  </p>
199 </dd>
200 <dd>
201  <p>
202   The behaviour of register_globals is always on, because the directive does not exist.
203  </p>
204 </dd>
205 <dd>
206  <p>
207   The short_tags() function may be used to enable short tags (&lt;?).
208  </p>
209 </dd>
210 <dd>
211  <p>
212   The CGI build has a 'make bench' tool for benchmarking the build. It will likely take
213   over 30 seconds to run so be sure to allow the appropriate time limit.
214  </p>
215 </dd>
216 <dd>
217  <p>
218   SAPI support is not available.
219  </p>
220 </dd>
221 <dd>
222  <p>
223   The HTTP PUT method is allowed for saving files, which are handled similarly to POST method
224   file saves. <em>$PHP_PUT_FILENAME</em> holds the location of the temporary file created, which
225   must be moved during the request else it will be deleted.
226  </p>
227 </dd>
228 <dd>
229  <p>
230   ODBC is enabled by default, to disable use <em>--disable-unified-odbc</em>
231  </p>
232 </dd>
233 <dd>
234  <p>
235   GD is enabled by default, to disable use <em>--without-gd</em>
236  </p>
237 </dd>
238 <dd>
239  <p>
240   Installing PHP 3 in Apache:
241  </p>
242  <pre>
243   AddModule mod_php3.c
244   LoadModule php3_module modules/libphp3.so
245   AddType application/x-httpd-php3 .php3
246  </pre>
247 </dd>
248 <dd>
249  <p>
250   The SESAM extension is specific to PHP 3 and was removed.
251  </p>
252 </dd>
253</dl>
254
255<h2 id="migration">Migration</h2>
256
257<p>
258 There are a few migration specific documents involving PHP 3 but due to
259 their size and structure they were not added to this document.
260</p>
261
262<h2 id="debugger">Debugger</h2>
263
264<p>
265 Information related to the debugger that comes standard with PHP 3 was
266 not added to this document.
267</p>
268
269<h2 id="internals">Internals</h2>
270
271<p>
272 Information related to the internal workings of PHP 3 that is commonly used
273 to create extensions was not added to this document.
274</p>
275
276<?php site_footer(); ?>
277